mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 841067 - Use sandboxPrototype rather than __proto__ for marionette sandboxes. r=jgriffin
sandboxPrototype implements fancy rebinding behavior that makes things work right. It is the "correct" mechanism to prototype a sandbox to a DOM Window.
This commit is contained in:
parent
c1703b8bb3
commit
0c59e10db8
@ -298,12 +298,11 @@ function resetValues() {
|
||||
* Returns a content sandbox that can be used by the execute_foo functions.
|
||||
*/
|
||||
function createExecuteContentSandbox(aWindow, timeout) {
|
||||
let sandbox = new Cu.Sandbox(aWindow);
|
||||
let sandbox = new Cu.Sandbox(aWindow, {sandboxPrototype: aWindow});
|
||||
sandbox.global = sandbox;
|
||||
sandbox.window = aWindow;
|
||||
sandbox.document = sandbox.window.document;
|
||||
sandbox.navigator = sandbox.window.navigator;
|
||||
sandbox.__proto__ = sandbox.window;
|
||||
sandbox.testUtils = utils;
|
||||
|
||||
let marionette = new Marionette(this, aWindow, "content",
|
||||
|
Loading…
Reference in New Issue
Block a user