mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
77d4a9794b
commit
ffc736c1a3
@ -193,7 +193,8 @@ const WorkerSandbox = Class({
|
|||||||
// `addon` in document is equivalent to `self` in content script.
|
// `addon` in document is equivalent to `self` in content script.
|
||||||
if (requiresAddonGlobal(worker)) {
|
if (requiresAddonGlobal(worker)) {
|
||||||
Object.defineProperty(getUnsafeWindow(window), 'addon', {
|
Object.defineProperty(getUnsafeWindow(window), 'addon', {
|
||||||
value: content.self
|
value: content.self,
|
||||||
|
configurable: true
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,8 @@ const WorkerSandbox = EventEmitter.compose({
|
|||||||
if (worker._injectInDocument) {
|
if (worker._injectInDocument) {
|
||||||
let win = window.wrappedJSObject ? window.wrappedJSObject : window;
|
let win = window.wrappedJSObject ? window.wrappedJSObject : window;
|
||||||
Object.defineProperty(win, "addon", {
|
Object.defineProperty(win, "addon", {
|
||||||
value: content.self
|
value: content.self,
|
||||||
|
configurable: true
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user