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

VERIFIED WORKSFORME

Status

()

Core
DOM: Core & HTML
P3
normal
VERIFIED WORKSFORME
19 years ago
19 years ago

People

(Reporter: dbaron, Assigned: vidur (gone))

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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).
Created attachment 2728 [details]
test case described in bug
Blocks: 18287
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 2

19 years ago
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.

Updated

19 years ago
Resolution: FIXED → ---

Comment 4

19 years ago
Clearing FIXED resolution due to reopen.
(Assignee)

Comment 5

19 years ago
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → WORKSFORME
(Assignee)

Comment 7

19 years ago
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.