1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 04:26:35 +02:00

Trying to get wrappedJSObject of an wrappedJSObject is wrong...

Fixes #133 and #134.
This commit is contained in:
kkapsner 2017-10-07 23:26:04 +02:00
parent 42ee6e483e
commit eb62521adc
4 changed files with 17 additions and 8 deletions

View file

@ -15,6 +15,8 @@
const {changedFunctions, setRandomSupply} = require("./modifiedAPI");
const randomSupplies = require("./randomSupplies");
const getWrapped = require("sdk/getWrapped");
setRandomSupply(randomSupplies.nonPersistent);
var apiNames = Object.keys(changedFunctions);
var undef;
@ -64,7 +66,7 @@
changedFunction.object:
[changedFunction.object]
).forEach(function(object){
var constructor = window.wrappedJSObject[object];
var constructor = getWrapped(window)[object];
if (constructor){
var original = constructor.prototype[name];
@ -134,7 +136,7 @@
case false:
return undef;
default:
return exportFunction(fake, window.wrappedJSObject);
return exportFunction(fake, getWrapped(window));
}
//case "block":
default: