1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

fake- and getterGenerator: added original and window in call

Might enable a performance increase.
This commit is contained in:
kkapsner 2019-05-10 08:28:28 +02:00
parent 103397e35d
commit 82ba61095a

View File

@ -305,7 +305,7 @@
if (descriptor.hasOwnProperty("value")){
if (changedFunction.fakeGenerator){
descriptor.value = exportFunction(
changedFunction.fakeGenerator(checker),
changedFunction.fakeGenerator(checker, original, window),
window
);
}
@ -339,7 +339,7 @@
if (descriptor && descriptor.hasOwnProperty("get")){
const original = descriptor.get;
const checker = generateChecker(name, changedGetter, siteStatus, original);
const getter = changedGetter.getterGenerator(checker);
const getter = changedGetter.getterGenerator(checker, original, window);
descriptor.get = exportFunction(getter, window);
if (descriptor.hasOwnProperty("set") && changedGetter.setterGenerator){