Synchronous XMLHttpRequest interferes with setTimeout

RESOLVED DUPLICATE of bug 340345

Status

()

Core
DOM
--
major
RESOLVED DUPLICATE of bug 340345
11 years ago
5 years ago

People

(Reporter: Mark Wubben, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.12pre) Gecko/20080105 Camino/1.6b1pre (like Firefox/2.0.0.12pre)
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b3pre) Gecko/2008011404 Minefield/3.0b3pre

I'm running a lot of timeouts with delay of 0ms. The timeout method performs a synchronous XHR. More than half of the time, the next timeout is fired when the XHR loads, instead of continuing the execution of the first timeout method.

I've verified the issue on Mac OS X 10.5.1 and on Ubuntu Linux, with the Firefox nightly build from January 14th, 2008.

Reproducible: Always

Steps to Reproduce:
1. Schedule two timeouts at 0ms delay
2. Make sure the first timeout performs a synchronous XHR

Actual Results:  
Observe that the second timeout is fired before the first timeout has finished execution.

Expected Results:  
The first timeout finishes execution, and only then the second timeout is fired.
(Reporter)

Comment 1

11 years ago
Created attachment 297135 [details]
Test case to reproduce the issue.

Comment 2

11 years ago
> DOM:Mozilla Extensions, dupe of bug 340345 ?
Assignee: general → nobody
Component: JavaScript Engine → DOM: Mozilla Extensions
QA Contact: general → general

Updated

11 years ago
Summary: Synchronous XMLHttpRequest interfers with setTimeout → Synchronous XMLHttpRequest interferes with setTimeout

Comment 3

10 years ago
Created attachment 334883 [details]
Simple example of this issue

Simple example, should alert 1,2,3,4, works in Firefox 2 and IE 6 and 7, in Firefox 3 alerts 1,4,2,3

Comment 4

10 years ago
Yeah, dupe of DOM:Mozilla Extensions, dupe of bug 340345
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 340345
(Assignee)

Updated

5 years ago
Component: DOM: Mozilla Extensions → DOM
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.