Closed Bug 577094 Opened 14 years ago Closed 14 years ago

Javascript Loops

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: lrx.luka, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; hr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; hr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

I think every infinite loop should be instantly stopped. Like javascript:while(1){history.go(-1);}

Reproducible: Always
This is almost definitely WONTFIX, just as far as implementation goes. There isn't guaranteed to be a relevant Web history for every place that JavaScript runs (e.g., outside of a browser in XUL), and the actual application may not even have a such thing as a browser. Even if that weren't the case, people do write legitimate loops where the condition is true or 1, and use conditionals inside the loop body to break out of it, especially if the conditions are complex.
this doesn't belong here and I don't think it's something we should be putting in core:js either.

running while(true) { something(); } will eventually popup the slow script dialog.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.