Access of window.screen in a detached contentWindow causes NS_ERROR_UNEXPECTED
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox121 | --- | fixed |
People
(Reporter: awathefox, Assigned: emilio)
References
Details
Attachments
(2 files)
Steps to reproduce:
- var elem = document.createElement('iframe')
- document.body.appendChild(elem)
- var win = elem.contentWindow
- document.body.removeChild(elem)
- win.screen
- This happens
Actual results:
Uncaught NS_ERROR_UNEXPECTED exception with no further information.
Expected results:
An Screen object with all values equal to default value (0, false, etc.) (Edge, Chromium, Android System Webview)
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
https://drafts.csswg.org/cssom-view/#dom-window-screen says "The screen attribute must return the Screen object associated with the Window object" . Maybe it requires a bit clarity on the expected behavior when the screen isn't associated with a Window object?
Comment 3•2 years ago
|
||
The severity field is not set for this bug.
:jfkthame, could you have a look please?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 4•2 years ago
|
||
The screen lifetime seems like it was a lot more complicated
in the past (looking at the comments in Window.webidl).
But nowadays it seems it can be more similar to the other
objects like VisualViewport etc.
| Assignee | ||
Comment 5•2 years ago
|
||
mozLockOrientation etc haven't done anything for a while.
Depends on D193212
Comment 8•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/bf2dfd2da634
https://hg.mozilla.org/mozilla-central/rev/9565b6ba1cc8
Description
•