Closed
Bug 56699
Opened 25 years ago
Closed 25 years ago
window.close() crashes browser/OS
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: bht237, Assigned: jst)
References
()
Details
(Keywords: crash)
Attachments
(3 files)
The following straight forward test case at least crashes the browser or worse
locks up the OS (there is no Ctrl+Alt+Del escape from this).
The offending JavaScript statement is self.close() of a new window.
Care has been taken to ensure that window.close() is the last statement in the
script as to not produce an over-complex scenario.
There is additional complexity because of the number of windows (3) involved
that may not neccessarily contribute to the problem.
However, this test case is an extract of a real life application crash and the
configuration having 3 windows should be kept to verify any fixes.
Below the 3 test file required to reproduce the crash:
<!--/*starter.htm*/-->
<HTML>
<HEAD>
<TITLE>Starter Opener</TITLE>
<SCRIPT>
function openNew(){
//Create new window
var newWin=window.open("main.htm","main","height=400,width=400");
}//End openNew()
</SCRIPT>
</HEAD>
<BODY>
<H1>Starter Opener</H1>
<FORM>
<INPUT type=button value="Open Main" onclick=openNew()>
</FORM>
</BODY>
</HTML>
<!--/*main.htm*/-->
<HTML>
<HEAD>
<TITLE>Main Window</TITLE>
<SCRIPT>
function openNew(){
//Create new window
var newWin=window.open("slave.htm","slave","height=400,width=400");
}//End openNew()
function doStuff(win){
//Do some stuff
win.finishAction();
}//End doStuff()
</SCRIPT>
</HEAD>
<BODY>
<H1>Main Window</H1>
<FORM>
<INPUT type=button value="Open Slave" onclick=openNew()>
</FORM>
</BODY>
</HTML>
<!--/*slave.htm*/-->
<HTML>
<HEAD>
<TITLE>Slave Window</TITLE>
<SCRIPT>
function finishAction(){
self.close();
}//End finishAction()
function init(){
//Connect to main window
var mainWin=window.open("main.htm","main","height=400,width=400");
mainWin.doStuff(self);
}//End init()
</SCRIPT>
</HEAD>
<BODY onload=init()>
<H1>Slave Window must close!</H1>
</BODY>
</HTML>
Comment 1•25 years ago
|
||
Confirmed the crash on Linux 2000-10-14-09, but the OS did not crash :-)
Adding crash keyword. OS->All. (for the record: reporter's OS was Win95).
Adding the 3 files provided by reporter as attachments below. When testing,
save these attachments with the proper name.
Comment 2•25 years ago
|
||
Comment 3•25 years ago
|
||
Comment 4•25 years ago
|
||
Assignee | ||
Comment 5•25 years ago
|
||
Thanks for the great testcase! When looking at what caused this I realized that
this is a dup of bug 54868 (this might seem a bit different, but the fix for bug
54868 also fixes this problem) so I'll dup this bug.
*** This bug has been marked as a duplicate of 54868 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•