Closed Bug 669926 Opened 13 years ago Closed 13 years ago

alerts break the single JavaScript thread, messing up setTimeout

Categories

(Firefox :: General, defect)

5 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 637264

People

(Reporter: cjavapro, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30 Steps to reproduce: Run this simple htm page <script> var failsafe = setTimeout(function () { alert('JavaScript Error') }, 1) alert('1') alert('2') clearTimeout(failsafe) </script> Actual results: Alerted 1 JavaScript Error 2 Expected results: alert 1 2 and don't alert X I have used this as a way to detect an error. So if some code threw an error, clearTimeout would never be called. But with this new version of Firefox, some of my pages show JavaScript Error, even if there is no error. This may or may not be the same bug as https://bugzilla.mozilla.org/show_bug.cgi?id=637264 Also, this was recreated by replacing the two alerts 1 and 2 with a call to window.open. That may not be the same issue. Lets fix this one first.
Reproduced: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Works for me: Mozilla/5.0 (X11; Linux x86_64; rv:6.0a2) Gecko/20110705 Firefox/6.0a2 Mozilla/5.0 (X11; Linux x86_64; rv:8.0a1) Gecko/20110707 Firefox/8.0a1
OS: Other → All
Version: 4.0 Branch → 5 Branch
I forgot to mention that this is intermittent. Does not always happen, but seems to happen more than half the time in my Firefox 4.0 for Ubuntu. Cannot recreate in Windows Vista Firefox 3.6.18
Yes, this is one of the observable consequences of Bug 637264.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.