Closed
Bug 6005
Opened 25 years ago
Closed 25 years ago
crash closing window
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
M6
People
(Reporter: danm.moz, Assigned: joki)
References
Details
(Whiteboard: problem understood. fix not so lucky.)
Closing a window from JavaScript (on an event handler for a button, say) crashes. This is not the same crash
as was fixed just a couple of days ago. Someone has bestowed a new one on us. In particular, a window closed
using the ToolkitCore method CloseWindow will crash reliably in jsinterp.c, as it attempts to clean up after
handling the function call to CloseWindow.
The webshell is finally being deleted, taking the JavaScript context with it. Not sure who wants this bug;
I guess I'll babysit it for a while.
OS: Mac System 8.5 → All
Whiteboard: problem understood. fix not so lucky.
The problem here is that JavaScript perhaps reasonably expects things not to be deleted from underneath it
as it's executing a script.. Not too surprisingly, the CloseWindow script is causing the GlobalWindow to be
deleted, taking with it the JavaScript context..
If the GlobalWindow object holding a JavaScript context could be found and addrefed for the duration of
a JS script's execution, things would be much happier. I'd like to ask the help of someone who understands
this stuff at least a little. This probably means I'm going to try to drop this bomb on someone.
Updated•25 years ago
|
Severity: major → critical
Priority: P3 → P1
Target Milestone: M6
Comment 4•25 years ago
|
||
Raising priority to 1 and severity to critical, targetting M6, cc'ing clayton &
brendan in a plea for help from the JS gods.
Updated•25 years ago
|
Assignee: danm → joki
Comment 5•25 years ago
|
||
Yup this one's for us.
jan, since vidur and joki have accepted this, i think that means it's a layout
bug and not core javascript.
jan, since vidur and joki have accepted this, i think that means it's a layout
bug and not core javascript.
Comment 10•25 years ago
|
||
*** Bug 6593 has been marked as a duplicate of this bug. ***
Comment 11•25 years ago
|
||
*** Bug 6745 has been marked as a duplicate of this bug. ***
Comment 12•25 years ago
|
||
*** Bug 6743 has been marked as a duplicate of this bug. ***
Comment 13•25 years ago
|
||
*** Bug 6760 has been marked as a duplicate of this bug. ***
Comment 14•25 years ago
|
||
Adding waterson and leaf to cc.
Comment 15•25 years ago
|
||
Adding waterson and leaf to cc.
Comment 16•25 years ago
|
||
*** Bug 6512 has been marked as a duplicate of this bug. ***
Comment 17•25 years ago
|
||
A test case sample:
<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<!DOCTYPE window>
<window style="width: 100%; height: 100%"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="setTri()">
<titledbutton popup="popupStuff" value="Click me for a popup!"/>
<popup id="popupStuff">
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<titledbutton onclick="window.close();" value="Click me bitch."/>
</window>
</popup>
</window>
Comment 18•25 years ago
|
||
Please excuse the rude language in the test case. I made the mistake of
pasting it directly without sanitizing it first (you can tell it's a
frustrating bug). :)
Comment 19•25 years ago
|
||
Crash experienced in after create profile wizard finishes it's job profiles is
due to CloseWindow() call of toolkitCore. Is this bug going to keep track that
problem too ?
Comment 20•25 years ago
|
||
sorry.. let me rephrase.
Crash experienced after create profile wizard finishes it's job in profiles core
is due to CloseWindow() call of toolkitCore. Is this bug going to keep track
that problem too ?
Comment 21•25 years ago
|
||
*** Bug 6615 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 22•25 years ago
|
||
Looking now to see if the nsToolkitCore::CloseWindow crash is the same but I
suspect it is. Hoping to have fix tomorrow.
Assignee | ||
Comment 23•25 years ago
|
||
Okay, I think I got this one. The profile manager doesn't crash on exit
anymore. However, there are multiple paths into this one from the many test
cases if one of them still crashes please add a test case for the remaining
crash case and reopen. Marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 24•25 years ago
|
||
gbush, can you Verify please?
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
QA Contact: 4395 → 4616
Comment 25•25 years ago
|
||
Currently there is no crash on closing window using javascript. But command
window.close() does not close window actually and there is already a bug for
that [Bug# 5444]. Marking this bug as verified.
Updated•25 years ago
|
QA Contact: 4616 → 4395
Comment 26•25 years ago
|
||
builds 199052408 on WinNT, Mac8.5PPC, Linux, Win95, Win98
all bring up Profile Manager and exit gracefully
Comment 27•25 years ago
|
||
Actually on Win95 using todays build [1999-05-24-09 apprunner] if we try to
follow directions in bug# 5800 [which is dup of this bug] then it still does not
close the Link source dialog. I think its because of window.close() or
self.close() is not working. If I sound wrong please let me know, so in that
case we need to re-open bug# 5800.
Comment 28•25 years ago
|
||
I followed steps in bug 5800 and could not close link dialog as you noted. I
reopened 5800. It does not appear to be same behavior as
noted in this bug.
Comment 29•25 years ago
|
||
Just a guess here...
I doubt that's a bug. window.close() will only work if the OPENER property
is set for the window. I'm guessing this was opened using the toolkit core
(which doesn't set the opener property), and then an attempt was made to
close it with window.close().
The toolkit core is obsolete, and shouldn't be used to open windows any more.
Comment 30•25 years ago
|
||
Changing component to "Javascript Engine". "Javascript" component is being
retired.
You need to log in
before you can comment on or make changes to this bug.
Description
•