JavaScript errors are spawned on the current page while retrieving a new page

RESOLVED DUPLICATE of bug 199430

Status

()

RESOLVED DUPLICATE of bug 199430
16 years ago
16 years ago

People

(Reporter: daniel, Unassigned)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3) Gecko/20030312

When clicking through to a new page, JavaScript functions on the current page
can spawn errors as the page is unloaded (i.e., the page unload process seems to
be somewhat out of sync with the JavaScript; allowing functions to fire after
certain JavaScript elements--variables, other functions, etc.--have been
unloaded, causing errors). This could be related to bug #76495.

Reproducible: Always

Steps to Reproduce:
1. Open your JavaScript console. 
2. Rollover repeatedly over the page links, noting that no errors are 
generated in the console.
3. Click through to any of the links, then continue rolling over the remaining
links while the new page is loading. 
4. Observe multiple "myBooleanVar is not defined" error messages from the rollovers.

Actual Results:  
JavaScipt errors are produced. 

Expected Results:  
IMO the unload synchronization should be such that JavaScript snippets can't be
executed while the JavaScript of the page itself is in the process of being
unloaded. Either that, or let me know what the proper work around/technique is. :)
(Reporter)

Comment 1

16 years ago
Created attachment 120755 [details]
test HTML page; several links with mouseover/mouseouts
(Reporter)

Comment 2

16 years ago
Clarification: The error produced is "checkVar is not defined" not "myBooleanVar
is not defined." I've seen examples in the wild of the actual variable being 
undefined, though; will work on creating a small test case that demonstrates that. 

Comment 3

16 years ago
This is not a bug for JavaScript Engine. The browser has many parts;
see http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser.
JavaScript Engine is independent of the browser and does not handle events.

Reassigning to Layout, and cc'ing Brian and Aaron, for parity with
these similar reports:

bug 76495
"Fetching a new page immediately disables user interaction with the  
one being viewed (keyboard, links, scrollbars become unresponsive)"

bug 199430
"Eventhandlers still fire while a new page is loading"


In fact, this bug sounds like a duplicate of bug 199430.
Assignee: rogerl → other
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → Layout
Ever confirmed: true
QA Contact: pschwartau → ian
(Reporter)

Comment 4

16 years ago
Agreed; this appears to be a dup of bug 199430. Sorry for the duplication.

Comment 5

16 years ago
Dan: thanks. Let me dupe this one, then. You will be cc'ed
on bug 199430 so you can follow progress on this issue.

Thank you for this report; I will also mention your testcase -

*** This bug has been marked as a duplicate of 199430 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.