Closed Bug 77404 Opened 23 years ago Closed 23 years ago

[xpcdom]script stops working after opening new window

Categories

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

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: jst)

Details

Attachments

(1 file)

DESCRIPTION:  On the XPCDOM branch (current trunk as of 2001-04-24 0000T), if I
load a simple JS page (which I will attach) that prints text into a PRE element
when the user presses a button, the test stops functioning correctly after I
open a new window.

STEPS TO REPRODUCE:
 1. load attached testcase
 2. press button in testcase (repeatedly, if you want)
 3. Hit Ctrl-N to open new window
 4. Either:
    a. close the new window, or,
    b. switch back to the old window
 5. press button in testcase (repeatedly, if you want)

EXPECTED RESULTS:
 2. Each time user presses button, new line of text appears.
 5. Same as (2).

ACTUAL RESULTS:
 2. as expected
 5. nothing happens
I suspect this may be related to not having something rooted -- the problem
seems to start when a JS GC is triggered.  (I can also reproduce the problem by
opening the second window first, and then loading a new page in the second window.)

Note also that if step (2) is omitted step (5) will work correctly.  In other
words, things seem to stop working after the first GC following the first
execution of script.
Hmmm... I don't see this anymore.
Yup, the problem was that the element with the onclick handler wasn't rooted and
got collected so the event handler disappeared. Fixed yesterday...
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
verified
Status: RESOLVED → VERIFIED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: