diff --git a/common/levels.js b/common/levels.js index 25c7ea0b..7f361f9e 100644 --- a/common/levels.js +++ b/common/levels.js @@ -89,7 +89,6 @@ var wrapping_groups = { wrappers: [ // HRT "Performance.prototype.now", - "window.PerformanceEntry", // PT2 "performance.getEntries", "performance.getEntriesByName", diff --git a/common/wrappingS-HRT.js b/common/wrappingS-HRT.js index 1aa0222c..1164988f 100644 --- a/common/wrappingS-HRT.js +++ b/common/wrappingS-HRT.js @@ -24,20 +24,6 @@ * Create private namespace */ (function() { - function changePropertyPrototype(name) { - let descriptor = Object.getOwnPropertyDescriptor(PerformanceEntry.prototype, name); - let originalF = descriptor['get']; - let replacementF = function() { - let originalVal = originalF.call(this, ...arguments); - return func(originalVal, precision); - // Replace this when injecting, to differ between startTime and duration functions - '__name__'; - }; - descriptor['get'] = replacementF; - original_functions[replacementF.toString()] = originalF.toString(); - Object.defineProperty(PerformanceEntry.prototype, name, descriptor); - } - var wrappers = [ { parent_object: "Performance.prototype", @@ -68,21 +54,6 @@ return func(originalPerformanceValue, precision); ` }, - { - parent_object: "window", - parent_object_property: "PerformanceEntry", - wrapped_objects: [], - helping_code: rounding_function + noise_function + ` - let precision = args[0]; - let doNoise = args[1]; - var func = rounding_function; - if (doNoise === true){ - func = noise_function - } - (${changePropertyPrototype.toString().split("__name__").join('"startTime"')})('startTime'); - (${changePropertyPrototype.toString().split("__name__").join('"duration"')})('duration'); - ` - } ]; add_wrappers(wrappers); })();