Closed Bug 18301 Opened 25 years ago Closed 25 years ago

[4.xP]JS Window objects disappearing after window closed

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: dbaron, Assigned: vidur)

References

Details

Attachments

(1 file)

DESCRIPTION:  In NN 4.x you could do things like:

thewin = open("http://www.mozilla.org");

and later on test for

thewin.closed

which was a boolean that was false if the window was still open and true if the
user had closed it.  However, in Mozilla, it is (correctly) returning false when
the window is open.  However, when the window is closed, it is returning
undefined rather than true.  This means the JS window object is completely
disappearing.  Some remnant of it needs to stay around.

STEPS TO REPRODUCE:
 * load attached test case - it opens a window with http://www.mozilla.org/ in
it.
 * click the "tell me about the window button"
 * close the window that it opened.
 * click the button again

ACTUAL RESULTS:
 * the first time, the result is correct - it says the window is still open,
since window.closed is false
 * the second time, it also says the window is still open, because thewin.closed
is undefined

EXPECTED RESULTS:
 * the second time it should say that the window has been closed and
window.closed is true.

DOES NOT WORK CORRECTLY ON:
 * Linux, apprunner, 1999-11-08-08-M11

WORKS CORRECTLY ON:
 * NN 4.61 Linux

ADDITIONAL INFORMATION:
The fact that this test is failing (in combination with the window object having
been destroyed) causes JS errors on the page in bug 18287 (the main URL).
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fix checked in on 11/16/1999. Since the window's scope has been cleared we
explicitly set a property indicating that it has been closed.
Status: RESOLVED → REOPENED
Reopening.  I see no improvement from the original report in Linux mozilla
1999-11-22-08-M12.
Resolution: FIXED → ---
Clearing FIXED resolution due to reopen.
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → WORKSFORME
David, I tried it on the 12/20/1999 build on both Windows and Linux. My original
fix still works. I suppose it's possible that leaks (that have since been fixed)
may have prevented this from working correctly somewhere along the way.
Status: RESOLVED → VERIFIED
Verified, Linux mozilla 1999-12-19-09-M13.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: