Closed
Bug 307777
Opened 19 years ago
Closed 11 years ago
Accessing properties on an already-closed window asserts
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bzbarsky, Unassigned)
Details
Attachments
(1 file)
|
257 bytes,
text/html
|
Details |
Testcase coming up, assertion is: ###!!! ASSERTION: XPConnect is being called on a scope without a 'Components' property! This is pretty much always bad. It usually means that native code is making a callback to an interface implemented in JavaScript, but the document where the JS object was created has already been cleared and the global properties of that document's window are *gone*. Generally this indicates a problem that should be addressed in the design and use of the callback code. : 'Error', file ../../../../../mozilla/js/src/xpconnect/src/xpcwrappednativescope.cpp, line 564
| Reporter | ||
Comment 1•19 years ago
|
||
| Reporter | ||
Updated•19 years ago
|
Flags: blocking1.8b5?
Comment 2•19 years ago
|
||
jst and I talked about this some. The problem is that when the window is going away (and we call SetDocShell(nsnull)) we ClearScope on the inner window. We probably asserted even before the split window landing. The fix for this might be to not clear scope (which jst says we shouldn't do anyway) and instead come up with a better way of breaking the window -> event listener -> window leak.
| Reporter | ||
Comment 3•19 years ago
|
||
I think what should happen is that event listeners should hold a weak ref to the window and the window should hold a strong ref to the listeners. When the window goes away it should notify the listeners so they drop their weak refs...
Comment 4•19 years ago
|
||
it's not clear to me why we should block the release on this. please renominate with an explanation if this is really a necessity for the release.
Flags: blocking1.8b5? → blocking1.8b5-
| Reporter | ||
Comment 5•19 years ago
|
||
So do listeners still hold a strong ref to the window now that dbaron's patches for addEventListener have landed? If they hold weak refs now, should we try not clearing the scope and seeing how things look? I do think we should try to fix this for 1.9...
Flags: blocking1.9a1?
Flags: blocking1.9a1? → blocking1.9-
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Comment 6•11 years ago
|
||
This assertion is gone.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•