Bug 1078378 - Replace the array instance used by emitSync with one from the content's sandbox. r=Mossop

This commit is contained in:
ZER0
2014-10-06 13:56:18 -07:00
parent dd9798b9aa
commit b05dc3d753

View File

@@ -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));
},
/**