Closed Bug 86321 Opened 19 years ago Closed 19 years ago

Endless cycle in javascript hangs the browser

Categories

(Core :: JavaScript Engine, defect, critical)

x86
Linux
defect
Not set
critical

Tracking

()

VERIFIED DUPLICATE of bug 13350

People

(Reporter: duke, Assigned: rogerl)

Details

(Keywords: hang)

Attachments

(1 file)

for (i = 0; i < 10; i--)
{
}

Results:
Executing this code hangs the browser, nothing (buttons, menus) works anymore
(e.g. completelty unresponsive). The only option to continue work is to kill
the browser process.

Expected results:
Javascript engine should detect this, and perhaps issue a warning when the 
script has been running for too long (that is what IE does).  

Tested on:
Latest nightly build for Linux (2001061706) available as of writing of this.
Severity: normal → critical
Keywords: hang

*** This bug has been marked as a duplicate of 13350 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Marking Verified Duplicate - 

Note that this is actually a bug for the DOM, not JavaScript Engine.
The JS Engine provides what's called a "branch callback" at the bottom
of each loop. It is up to the embedding of the JS Engine, in this 
case the DOM, to decide what to do with it.

Thank you for this report. You are now cc'ed on bug 13350, and thus 
will be able to follow the progress on it -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.