mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1078378 - Replace the array instance used by emitSync
with one from the content's sandbox. r=Mossop
This commit is contained in:
parent
f1a8c1f87f
commit
015b238d7a
@ -74,7 +74,10 @@ const WorkerSandbox = Class({
|
||||
* Mainly used by context-menu in order to avoid breaking it.
|
||||
*/
|
||||
emitSync: function emitSync(...args) {
|
||||
return emitToContent(this, args);
|
||||
// because the arguments could be also non JSONable values,
|
||||
// we need to ensure the array instance is created from
|
||||
// the content's sandbox
|
||||
return emitToContent(this, new modelFor(this).sandbox.Array(...args));
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user