DOMParser breaks execution chain (sort of "not thread safe")

UNCONFIRMED
Unassigned

Status

()

Core
XML
UNCONFIRMED
11 years ago
9 years ago

People

(Reporter: Alex Vassiliev, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)

Observed on Ubuntu Linux and Solaris, but not on any Windows OS.

DOMParser.parseFromString call can divert to handle XMLHTTPRequest callback. 

Another words. I have a piece of code which builds application state. It calls DOMParser multiple times. Eventually, (nondeterministically) DOMParser.parseFromString() decides that it is a time to call XMLHTTPRequest callback function. This callback function faces half-build application state.

The fact of DOMParser.parseFromString() subsequently (in the same execution chain) calls XMLHTTPRequest callback can be confirmed by observing callstack in Venkman debugger.

Reproducible: Always

Steps to Reproduce:
1. Make asynchronous XMLHTTPRequest 
2. Make endless loop with DOMParser.parseFromString() in it's body
3. Run
4. Observe the callback for XMLHTTPRequest is being called (note the callstack)

Actual Results:  
Endless loop being interrupted and XMLHTTPRequest callback being called.

Expected Results:  
Endless loop will "block" any other scripts from being executed.
Assignee: xml → nobody
QA Contact: ashshbhatt → xml
You need to log in before you can comment on or make changes to this bug.