mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1120839 - Add 'allowXULXBL' permission for nested-oop iframe, r=ted.mielczarek
This commit is contained in:
parent
e116db3134
commit
fb69d03a3f
@ -61,6 +61,7 @@ SpecialPowers.prototype.sanityCheck = function() { return "foo"; };
|
||||
// This gets filled in in the constructor.
|
||||
SpecialPowers.prototype.DOMWindowUtils = undefined;
|
||||
SpecialPowers.prototype.Components = undefined;
|
||||
SpecialPowers.prototype.IsInNestedFrame = false;
|
||||
|
||||
SpecialPowers.prototype._sendSyncMessage = function(msgname, msg) {
|
||||
if (this.SP_SYNC_MESSAGES.indexOf(msgname) == -1) {
|
||||
@ -163,6 +164,9 @@ SpecialPowers.prototype.nestedFrameSetup = function() {
|
||||
mm.loadFrameScript(specialPowersBase + "MozillaLogger.js", false);
|
||||
mm.loadFrameScript(specialPowersBase + "specialpowersAPI.js", false);
|
||||
mm.loadFrameScript(specialPowersBase + "specialpowers.js", false);
|
||||
|
||||
let frameScript = "SpecialPowers.prototype.IsInNestedFrame=true;";
|
||||
mm.loadFrameScript("data:," + frameScript, false);
|
||||
}
|
||||
}, "remote-browser-shown", false);
|
||||
};
|
||||
@ -174,7 +178,11 @@ function attachSpecialPowersToWindow(aWindow) {
|
||||
(aWindow !== undefined) &&
|
||||
(aWindow.wrappedJSObject) &&
|
||||
!(aWindow.wrappedJSObject.SpecialPowers)) {
|
||||
aWindow.wrappedJSObject.SpecialPowers = new SpecialPowers(aWindow);
|
||||
let sp = new SpecialPowers(aWindow);
|
||||
aWindow.wrappedJSObject.SpecialPowers = sp;
|
||||
if (sp.IsInNestedFrame) {
|
||||
sp.addPermission("allowXULXBL", true, aWindow.document);
|
||||
}
|
||||
}
|
||||
} catch(ex) {
|
||||
dump("TEST-INFO | specialpowers.js | Failed to attach specialpowers to window exception: " + ex + "\n");
|
||||
@ -197,6 +205,7 @@ SpecialPowersManager.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var specialpowersmanager = new SpecialPowersManager();
|
||||
|
||||
this.SpecialPowers = SpecialPowers;
|
||||
|
Loading…
Reference in New Issue
Block a user