Reputation: 181
During recent development I've discovered infinite loop in application I'm working on. First error I got was while using FF4, and later I've done same test in IE8 and FF3.6. Now, even that I've noticed that IE8 is throwing exception (error popup with stop script button) much faster than FF4, the error was always thrown by both browsers for that error.
After upgrading FF4 to FF5 I noticed something that could be quite a problem for developers.
FF5 is stopping/breaking infinite loop, and continue to work without noticing the user.
I'm not sure if I bump on some weird behavior, and I'd like someone to confirm (before I drop FF5 from my dev tools).
Upvotes: 0
Views: 586
Reputation: 38345
I ran the following script:
<script>
var i = 0, j = 0;
console.log(i);
console.log(j);
while(i < 1) {
j++;
}
console.log(j);
</script>
in Firefox 5 and got a confirm dialog notifying me of a potential infinite loop, and asking whether or not I wanted to stop the script.
Upvotes: 1