- From: poot <cvsmail@w3.org>
- Date: Sun, 28 Dec 2008 21:08:37 +0900 (JST)
- To: public-html-diffs@w3.org
Add a section explicitly talking about killing scripts that run for too
long. (whatwg r2601)
event loops
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1772.html#event-loop
5.4.3.4 Killing scripts
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1772.html#killing-scripts
The script settings determined from the node
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1772.html#the-script-settings-determined-from-the-node
5.4.4 Event loops
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1772.html#event-loops
http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1771&r2=1.1772&f=h
http://html5.org/tools/web-apps-tracker?from=2600&to=2601
===================================================================
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><script>
+ while (true) { /* loop */ }
+</script></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:09:19 UTC