[Webkit-unassigned] [Bug 8949] New: Provide some way to stop a JavaScript infinite loop

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Tue May 16 16:50:13 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=8949

           Summary: Provide some way to stop a JavaScript infinite loop
           Product: WebKit
           Version: 312.x
          Platform: S60 Hardware
        OS/Version: other
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: krishnamurty.podipireddy at nokia.com
                CC: darin at apple.com, bugzilla at brian.codekitchen.net


+++ This bug was initially created as a clone of Bug #7080 +++

At current, infinite javascript loops are really infinite, we need a way to
detect and stop them.
This currently occurs in:

- bug 3552
- bug 6693
- bug 6958

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.

Try the following test case:

<html>
<head> 
        <title>Abort Feature 1</title>
        <script type="text/javascript">
            var run = true;
            var a = 1;
            function startLoop(){
               while(run){
                         a++;
                         document.forms[0].elements[0].value=a;
                        }       
               }        
        </script>
</head>
<body>
<h3>Abort Feature 1</h3>
        <p>
        Activate the "Start Loop" link below to start an infinite loop by
script
        execution.<br/>  Then stop script execution using script cancellation
UI feature.
        </p>

        <p>     
                <a href="#" onClick="startLoop()">Start Loop</a><br/>
                <form><input/></form>
        </p>

</body>
</html>


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list