Bug 841067 - Fix sandbox xhr tests. r=bz

This commit is contained in:
Bobby Holley 2013-02-14 10:40:15 +01:00
parent f14adc169f
commit f72c8d5743

View File

@ -39,7 +39,7 @@ function test() {
let sandbox = new Cu.Sandbox(workerWindow);
// inject some functions from the window into the sandbox.
// postMessage so the async code in the sandbox can report a result.
sandbox.importFunction(workerWindow.postMessage, "postMessage");
sandbox.importFunction(workerWindow.postMessage.bind(workerWindow), "postMessage");
sandbox.importFunction(workerWindow.XMLHttpRequest, "XMLHttpRequest");
Cu.evalInSandbox(sandboxCode, sandbox, "1.8");
}, true);