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)

x86
macOS
defect

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); } } }
Priority: -- → P1
tracking-e10s: m8+ → ---
Whiteboard: [unsafe-cpow-usage]
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
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?
Assignee: wmccloskey → nobody
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.