Open Bug 1278917 Opened 5 years ago Updated 2 years ago

Execution of atomic javascript function gots interrupted by an onload callback eventhandler

Categories

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

defect

Tracking

()

UNCONFIRMED

People

(Reporter: jsrosman, Unassigned)

References

()

Details

(Keywords: parity-chrome, parity-edge, Whiteboard: btpp-followup-2016-06-15)

Attachments

(2 files)

Attached file race.htm
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36

Steps to reproduce:

- place attached file race.htm on website and open it in browser
- you can also try this link https://jsfiddle.net/34oubfeq/ 


Actual results:

In Firefox the webpage shows: ERROR: RACE Condition!!!!!


Expected results:

2 alerts with "OK" should appear and Webpage should show "OK"
Severity: normal → critical
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All
Summary: Execution of atomic javascript function gots interrupted by a callback eventhandler of an async operation → Execution of atomic javascript function gots interrupted by an onload callback eventhandler
Severity: critical → normal
Priority: P1 → --
Component: Untriaged → DOM: Events
Product: Firefox → Core
This is a dup of the bug that we spin event loop during alert
Component: DOM: Events → DOM
It also happens when we do a sync XHR in stead of an alert (See commented code in the example)
Having same issue with chrome on linux:
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.37 Safari/537.36
(In reply to Olli Pettay [:smaug] (high review load, please consider other reviewers) from comment #1)
> This is a dup of the bug that we spin event loop during alert

Bug 1173716?
Whiteboard: btpp-followup-2016-06-15
Sorry, wrong browser used for lookup of user agent. I had same issue with Firefox on linux (so with chrome it is working fine): Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Whiteboard: btpp-followup-2016-06-15 → btpp-followup-2016-06-15[parity-Chrome][parity-Edge]
(In reply to Andrew Overholt [:overholt] from comment #4)
> (In reply to Olli Pettay [:smaug] (high review load, please consider other
> reviewers) from comment #1)
> > This is a dup of the bug that we spin event loop during alert
> 
> Bug 1173716?

This is not a duplicate but I think it is related. I have attached a new reproduction scenario (race_case2.htm) where we load 2 iframes while doing a synchroneous XmlHttpRequest. Same issue in FF. This can also be reproduced with window.open().
Hi All,

Please fix this. This is a fundamental break in the functionality.
Priority: -- → P2
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: btpp-followup-2016-06-15[parity-Chrome][parity-Edge] → btpp-followup-2016-06-15
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.