зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1107443 part 5. Fix the addon SDK to not try defining non-configurable properties on content windows. r=mossop
This commit is contained in:
Родитель
434f98fb7d
Коммит
57de0e8c3f
|
@ -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
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче