Closed
Bug 1146924
Opened 10 years ago
Closed 7 years ago
sdk/content/mod.js causes unsafe CPOW usage warnings
Categories
(Add-on SDK Graveyard :: General, defect, P1)
Tracking
(e10s+)
RESOLVED
INCOMPLETE
Tracking | Status | |
---|---|---|
e10s | + | --- |
People
(Reporter: mconley, Unassigned)
References
Details
(Whiteboard: [unsafe-cpow-usage])
function attach(modification, target) {
if (!modification)
return;
let window = getTargetWindow(target);
attachTo(modification, window);
// modification are stored per content; `window` reference can still be the
// same even if the content is changed, therefore `document` is used instead.
add(modification, window.document); <-- window.document causes unsafe CPOW usage when window is a CPOW
}
function detach(modification, target) {
if (!modification)
return;
if (target) {
let window = getTargetWindow(target);
detachFrom(modification, window);
remove(modification, window.document); <-- window.document causes unsafe CPOW usage when window is a CPOW
}
else {
let documents = iterator(modification);
for (let document of documents) {
let window = document.defaultView;
// The window might have already gone away
if (!window)
continue;
detachFrom(modification, document.defaultView);
remove(modification, document);
}
}
}
Updated•10 years ago
|
Blocks: e10s-sdk, sdk/page-mod
Priority: -- → P1
Reporter | ||
Updated•9 years ago
|
tracking-e10s:
m8+ → ---
Whiteboard: [unsafe-cpow-usage]
Reporter | ||
Comment 1•9 years ago
|
||
content/mod is a module that can be used by both the SDK and by add-ons code, and is not cpow-safe.
tracking-e10s:
--- → ?
Assignee: nobody → wmccloskey
Reporter | ||
Updated•9 years ago
|
Reporter | ||
Updated•9 years ago
|
Comment 2•9 years ago
|
||
Our current promise is that high level APIs are e10s ready, but this one is relying on shims and can cause unsafe CPOW usage. Should we block on this?
Updated•9 years ago
|
Updated•9 years ago
|
Assignee: wmccloskey → nobody
Comment 3•7 years ago
|
||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•