Open Bug 437386 Opened 17 years ago Updated 3 years ago

setInterval function is still fired 1 time when onunload was already finished in an Iframe

Categories

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

x86
All
defect

Tracking

()

People

(Reporter: sjoerdmulder, Unassigned)

References

()

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 Normally the intervals and timeouts are stopped before the unload is finished, this because the onunload might clear / clean variables which are expected to be in the functions of the timeout. In Firefox 3 this behavior changed, causing error like "bb is not defined" after the page was unloaded, this behavior only seems to happen in an iframe and not when in a normal page. Reproducible: Always Steps to Reproduce: 1. See attachted testcase 2. Open the parent.html 3. Press reload Actual Results: It alerts 'How is this possible!?' because of in the function myVar.doIt the myVar variable should always exists, but apparently it's killed in the unload before the timer stops Expected Results: Nothing happens This is found in the Backbase AJAX Framework.
Attached file Testcase
Version: unspecified → 1.9.0 Branch
Attached file child.html
over to dom0
Assignee: general → nobody
Component: JavaScript Engine → DOM: Level 0
OS: Windows XP → All
QA Contact: general → general
Is this going to be picked up before Firefox 3 releases, because i think it's a pretty important bug!
This is interesting. What happens is that we navigate the outer frame to the new document (canceling its timeouts, etc) but don't get around to telling the inner frame that we've navigated until after paint suppression has lifted. So the timeout has that window in which to fire, and does. One possible way to fix this would be to iterate through sub-frames when we clear the outer window (if we're not saving its state) and suspend timeouts on them until they get cleaned up later, but I'm not convinced that's the best way to go.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 1.9.0 Branch → Trunk
Looks to be similar phenomenon to Bug 199430 and Bug 252542(both are Main Window case) after fix of Bug 296639. > Bug 199430 eventhandlers still fire while a new page is loading > Bug 252542 The attached events are not removed while reloading the page. JavaScript errors are occuring Bug 296639 was landed on trunk only, so not applied to Fx 2 but applied to Fx 3. Bug 199430 : consecutive click of send button, switch to new URL, Main Window Bug 252542 : event such as onmouseover, Reload(==same URL), Main Window This bug : Timer event by setInterval, Reload(==same URL). It sounds to be IFRAME(or FRAME) only issue.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: