Closed Bug 361179 Opened 18 years ago Closed 17 years ago

Function.prototype race condition in popup windows

Categories

(Core :: JavaScript Engine, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 355161

People

(Reporter: chriseldredge, Unassigned)

Details

(Whiteboard: CLOSEME 07/14)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

A page which has a script nested in the body (evaluated during page load) that calls a function in another script included in the head will not have prototype extensions defined.

Reproducible: Sometimes

Steps to Reproduce:
1. Save the attached files "test.html" and "test.js" to your computer.
2. Navigate Firefox 2.0 to test.html.
3. Click the button.
4. Because the test is not 100% reproducible, it will continue to open and close a popup window until it detects that the test failed.  Wait for this to happen.  In my experience it will fail within a minute or not at all.

Actual Results:  
Sometimes when externalFunction is called (defined in test.js), the prototype property "a" is not defined, and the page displays the message "Test FAILED."

Expected Results:  
The window should always display the message "Test passed."

One one Windows XP SP2 machine this test case failed 100% of the time.  On another Windows XP SP1 machine the test failed about 20% of the time.  I could not reproduce the problem on a dual processor machine with a Linux 2.6.18 kernel.

The supplied test case will require popup blocking to be disabled.

I cannot reproduce this bug in Firefox 1.5.x, so this appears to be a regression.  May be related to bug 355161.
This is the first of 2 files needed to run the test case.
This is part 2 of 2 needed to execute the test case.
Reporter, do you still see this problem with the latest Firefox 2? If not, can you please close this bug as WORKSFORME. Thanks!
Whiteboard: CLOSEME 07/14
Version: unspecified → 2.0 Branch
Punting over to Core:JS Engine to see what they have to say.
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: 2.0 Branch → 1.8 Branch
Sounds like a dupe of bug 355161, as mentioned.
Status: UNCONFIRMED → RESOLVED
Closed: 17 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: