diff --git a/addon-sdk/source/lib/sdk/content/sandbox.js b/addon-sdk/source/lib/sdk/content/sandbox.js index 2545f306c741..08583e4fdb0f 100644 --- a/addon-sdk/source/lib/sdk/content/sandbox.js +++ b/addon-sdk/source/lib/sdk/content/sandbox.js @@ -193,7 +193,8 @@ const WorkerSandbox = Class({ // `addon` in document is equivalent to `self` in content script. if (requiresAddonGlobal(worker)) { Object.defineProperty(getUnsafeWindow(window), 'addon', { - value: content.self + value: content.self, + configurable: true } ); } diff --git a/addon-sdk/source/lib/sdk/deprecated/traits-worker.js b/addon-sdk/source/lib/sdk/deprecated/traits-worker.js index 0c16f28d4c20..7ca04e142acd 100644 --- a/addon-sdk/source/lib/sdk/deprecated/traits-worker.js +++ b/addon-sdk/source/lib/sdk/deprecated/traits-worker.js @@ -238,7 +238,8 @@ const WorkerSandbox = EventEmitter.compose({ if (worker._injectInDocument) { let win = window.wrappedJSObject ? window.wrappedJSObject : window; Object.defineProperty(win, "addon", { - value: content.self + value: content.self, + configurable: true } ); }