mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 1072472 - [e10s] Make sandbox shim work with COWs (r=mconley)
This commit is contained in:
parent
4465d2b3ff
commit
44e57f85b7
@ -581,6 +581,22 @@ let SandboxParent = {
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIContentFrameMessageManager);
|
||||
|
||||
if (rest.length) {
|
||||
// Do a shallow copy of the options object into the child
|
||||
// process. This way we don't have to access it through a Chrome
|
||||
// object wrapper, which would require __exposedProps__.
|
||||
//
|
||||
// The only object property here is sandboxPrototype. We assume
|
||||
// it's a child process object (since that's what Greasemonkey
|
||||
// does) and leave it alone.
|
||||
let options = rest[0];
|
||||
let optionsCopy = new chromeGlobal.Object();
|
||||
for (let prop in options) {
|
||||
optionsCopy[prop] = options[prop];
|
||||
}
|
||||
rest[0] = optionsCopy;
|
||||
}
|
||||
|
||||
// Make a sandbox in the child.
|
||||
let cu = chromeGlobal.Components.utils;
|
||||
let sandbox = cu.Sandbox(principal, ...rest);
|
||||
|
Loading…
x
Reference in New Issue
Block a user