Bug 1084385 - Clone chrome arrays before passing them to emitSync. r=gabor
authorBobby Holley <bobbyholley@gmail.com>
Sat, 18 Oct 2014 11:02:08 +0200
changeset 211105 bac6e8c4efab449dacec003ced64b25dfa86ab33
parent 211104 32182ec68d76d876305935ee9e733e984a31fde6
child 211106 fc25ace509cf79df817f852593e4e56837712396
push id27667
push usercbook@mozilla.com
push dateMon, 20 Oct 2014 12:40:56 +0000
treeherdermozilla-central@cc2d8bdbccb8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgabor
bugs1084385
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1084385 - Clone chrome arrays before passing them to emitSync. r=gabor
addon-sdk/source/lib/sdk/deprecated/traits-worker.js
--- a/addon-sdk/source/lib/sdk/deprecated/traits-worker.js
+++ b/addon-sdk/source/lib/sdk/deprecated/traits-worker.js
@@ -78,17 +78,17 @@ const WorkerSandbox = EventEmitter.compo
   /**
    * Synchronous version of `emit`.
    * /!\ Should only be used when it is strictly mandatory /!\
    *     Doesn't ensure passing only JSON values.
    *     Mainly used by context-menu in order to avoid breaking it.
    */
   emitSync: function emitSync() {
     let args = Array.slice(arguments);
-    return this._emitToContent(args);
+    return this._emitToContent(Cu.cloneInto(args, this._addonWorker._window));
   },
 
   /**
    * Method called by the worker sandbox when it needs to send a message
    */
   _onContentEvent: function onContentEvent(args) {
     // As `emit`, we ensure having an asynchronous behavior
     let self = this;