html5/spec Overview.html,1.1771,1.1772

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv27452

Modified Files:
	Overview.html 
Log Message:
Add a section explicitly talking about killing scripts that run for too long. (whatwg r2601)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1771
retrieving revision 1.1772
diff -u -d -r1.1771 -r1.1772
--- Overview.html	28 Dec 2008 11:21:24 -0000	1.1771
+++ Overview.html	28 Dec 2008 12:05:21 -0000	1.1772
@@ -593,7 +593,8 @@
       <ol>
        <li><a href=#definitions-0><span class=secno>5.4.3.1 </span>Definitions</a></li>
        <li><a href=#calling-scripts><span class=secno>5.4.3.2 </span>Calling scripts</a></li>
-       <li><a href=#creating-scripts><span class=secno>5.4.3.3 </span>Creating scripts</a></ol></li>
+       <li><a href=#creating-scripts><span class=secno>5.4.3.3 </span>Creating scripts</a></li>
+       <li><a href=#killing-scripts><span class=secno>5.4.3.4 </span>Killing scripts</a></ol></li>
      <li><a href=#event-loops><span class=secno>5.4.4 </span>Event loops</a>
       <ol>
        <li><a href=#generic-task-sources><span class=secno>5.4.4.1 </span>Generic task sources</a></ol></li>
@@ -27725,7 +27726,26 @@
    <li><p>The script group is the <a href=#current-script-group>current script group</a> of
    <var title="">document</var>.</li>
 
-  </ol><h4 id=event-loops><span class=secno>5.4.4 </span>Event loops</h4><p>To coordinate events, user interaction, scripts, rendering,
+  </ol><h5 id=killing-scripts><span class=secno>5.4.3.4 </span>Killing scripts</h5><p>User agents may impose resource limitations on scripts, for
+  example CPU quotas, memory limits, total execution time limits, or
+  bandwidth limitations. When a script exceeds a limit, the user agent
+  may either throw a <code><a href=#quota_exceeded_err>QUOTA_EXCEEDED_ERR</a></code> exception, abort
+  the script without an exception, prompt the user, or throttle script
+  execution.<div class=example>
+
+   <p>For example, the following script never terminates. A user agent
+   could, after waiting for a few seconds, prompt the user to either
+   terminate the script or let it continue.</p>
+
+   <pre>&lt;script&gt;
+ while (true) { /* loop */ }
+&lt;/script&gt;</pre>
+
+  </div><p>User agents are encouraged to allow users to disable scripting
+  whenever the user is prompted either by a script (e.g. using the
+  <code title=dom-alert><a href=#dom-alert>window.alert()</a></code> API) or because of a
+  script's actions (e.g. because it has exceeded a time limit).<p>If scripting is disabled while a script is executing, the script
+  should be terminated immediately.<h4 id=event-loops><span class=secno>5.4.4 </span>Event loops</h4><p>To coordinate events, user interaction, scripts, rendering,
   networking, and so forth, user agents must use <dfn id=event-loop title="event
   loop">event loops</dfn> as described in this section.<p>There must be at least one <a href=#event-loop>event loop</a> per user
   agent, and at most one <a href=#event-loop>event loop</a> per <a href=#unit-of-related-similar-origin-browsing-contexts>unit of

Received on Sunday, 28 December 2008 12:05:32 UTC