Closed Bug 202314 Opened 21 years ago Closed 21 years ago

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

Categories

(Core :: Layout, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 199430

People

(Reporter: daniel, Unassigned)

References

()

Details

Attachments

(1 file)

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. :)
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. 
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
Agreed; this appears to be a dup of bug 199430. Sorry for the duplication.
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
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: