RESOLVED DUPLICATE of bug 7080 6089
Javascript infinite loop hangs browser indefinitely
https://bugs.webkit.org/show_bug.cgi?id=6089
Summary Javascript infinite loop hangs browser indefinitely
Brian Palmer
Reported 2005-12-14 21:09:10 PST
Any sort of infinite loop in a javascript method will take over the entire browser, and requires a "force quit" on OS X to get Safari to stop hogging all the CPU. Gecko-based browsers (Camino & Firefox tested) let the script run away for a few seconds, then present a warning dialog asking whether the script should be allowed to continue. Perhaps something similar would be appropriate for Webkit and Safari? Opera seems to allow the script to go on indefinitely, but via threading the script doesn't take over the whole browser or seem to use as much CPU. Something as simple as this works: {{{ <script> function doIt() { var i = 0; while( i < 50 ) { } } </script> <button onclick="doIt();">Drink Me</button> }}}
Attachments
Alexey Proskuryakov
Comment 1 2006-02-07 13:30:36 PST
This report has been filed earlier, but the future of this issue seems to be with bug 7080 :) *** This bug has been marked as a duplicate of 7080 ***
Note You need to log in before you can comment on or make changes to this bug.