[html5] r8330 - [e] (0) Allow workers that become suspendable but still have outstanding work to [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Dec 3 14:58:17 PST 2013


Author: ianh
Date: 2013-12-03 14:58:15 -0800 (Tue, 03 Dec 2013)
New Revision: 8330

Modified:
   complete.html
   index
   source
Log:
[e] (0) Allow workers that become suspendable but still have outstanding work to get GC'ed.
Affected topics: DOM APIs, Workers

Modified: complete.html
===================================================================
--- complete.html	2013-12-03 22:39:17 UTC (rev 8329)
+++ complete.html	2013-12-03 22:58:15 UTC (rev 8330)
@@ -82315,14 +82315,15 @@
   <hr><p>A worker is said to be a <dfn id=permissible-worker>permissible worker</dfn> if its list of <a href="#the-worker's-documents">the worker's
   <code>Document</code>s</a> is not empty.</p>
 
-  <p>A worker is said to be a <dfn id=protected-worker>protected worker</dfn> if it is a <a href=#permissible-worker>permissible worker</a>
+  <p>A worker is said to be an <dfn id=active-needed-worker>active needed worker</dfn> if any of the <code><a href=#document>Document</a></code>
+  objects in <a href="#the-worker's-documents">the worker's <code>Document</code>s</a> are <a href=#fully-active>fully active</a>.</p>
+
+<!--CLEANUP-->
+  <p>A worker is said to be a <dfn id=protected-worker>protected worker</dfn> if it is an <a href=#active-needed-worker>active needed worker</a>
   and either it has outstanding timers, database transactions, or network connections, or its list
   of <a href="#the-worker's-ports">the worker's ports</a> is not empty, or its <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> is actually
   a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object (i.e. the worker is a shared worker).</p>
 
-  <p>A worker is said to be an <dfn id=active-needed-worker>active needed worker</dfn> if any of the <code><a href=#document>Document</a></code>
-  objects in <a href="#the-worker's-documents">the worker's <code>Document</code>s</a> are <a href=#fully-active>fully active</a>.</p>
-
   <p>A worker is said to be a <dfn id=suspendable-worker>suspendable worker</dfn> if it is not an <a href=#active-needed-worker>active needed
   worker</a> but it is a <a href=#permissible-worker>permissible worker</a>.</p>
 
@@ -82407,7 +82408,7 @@
 
 <!--CLEANUP-->
     <p><strong>Closing orphan workers</strong>: Start monitoring the worker such that no sooner than
-    it stops being either a <a href=#protected-worker>protected worker</a>, and
+    it stops being a <a href=#protected-worker>protected worker</a>, and
     no later than it stops being a <a href=#permissible-worker>permissible worker</a>, <var title="">worker global
     scope</var>'s <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag is set to true<!--
     v2-onclose and <span title="queue a task">a task is queued</span> to <span>fire a simple
@@ -82481,6 +82482,15 @@
 
    </li>
 -->
+
+   <li>
+   
+    <!-- this has no normative impact but makes it clearer that the worker is irrelevant now, and
+    doesn't have to survive until its Documents all die off too -->
+    <p>Empty the worker's list of <a href="#the-worker's-documents">the worker's <code>Document</code>s</a>.</p>
+
+   </li>
+
   </ol><hr><p>When a user agent is to <dfn id=kill-a-worker>kill a worker</dfn> it must run the following steps in parallel
   with the worker's main loop (the "<a href=#run-a-worker>run a worker</a>" processing model defined above):</p>
 

Modified: index
===================================================================
--- index	2013-12-03 22:39:17 UTC (rev 8329)
+++ index	2013-12-03 22:58:15 UTC (rev 8330)
@@ -82315,14 +82315,15 @@
   <hr><p>A worker is said to be a <dfn id=permissible-worker>permissible worker</dfn> if its list of <a href="#the-worker's-documents">the worker's
   <code>Document</code>s</a> is not empty.</p>
 
-  <p>A worker is said to be a <dfn id=protected-worker>protected worker</dfn> if it is a <a href=#permissible-worker>permissible worker</a>
+  <p>A worker is said to be an <dfn id=active-needed-worker>active needed worker</dfn> if any of the <code><a href=#document>Document</a></code>
+  objects in <a href="#the-worker's-documents">the worker's <code>Document</code>s</a> are <a href=#fully-active>fully active</a>.</p>
+
+<!--CLEANUP-->
+  <p>A worker is said to be a <dfn id=protected-worker>protected worker</dfn> if it is an <a href=#active-needed-worker>active needed worker</a>
   and either it has outstanding timers, database transactions, or network connections, or its list
   of <a href="#the-worker's-ports">the worker's ports</a> is not empty, or its <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> is actually
   a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object (i.e. the worker is a shared worker).</p>
 
-  <p>A worker is said to be an <dfn id=active-needed-worker>active needed worker</dfn> if any of the <code><a href=#document>Document</a></code>
-  objects in <a href="#the-worker's-documents">the worker's <code>Document</code>s</a> are <a href=#fully-active>fully active</a>.</p>
-
   <p>A worker is said to be a <dfn id=suspendable-worker>suspendable worker</dfn> if it is not an <a href=#active-needed-worker>active needed
   worker</a> but it is a <a href=#permissible-worker>permissible worker</a>.</p>
 
@@ -82407,7 +82408,7 @@
 
 <!--CLEANUP-->
     <p><strong>Closing orphan workers</strong>: Start monitoring the worker such that no sooner than
-    it stops being either a <a href=#protected-worker>protected worker</a>, and
+    it stops being a <a href=#protected-worker>protected worker</a>, and
     no later than it stops being a <a href=#permissible-worker>permissible worker</a>, <var title="">worker global
     scope</var>'s <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag is set to true<!--
     v2-onclose and <span title="queue a task">a task is queued</span> to <span>fire a simple
@@ -82481,6 +82482,15 @@
 
    </li>
 -->
+
+   <li>
+   
+    <!-- this has no normative impact but makes it clearer that the worker is irrelevant now, and
+    doesn't have to survive until its Documents all die off too -->
+    <p>Empty the worker's list of <a href="#the-worker's-documents">the worker's <code>Document</code>s</a>.</p>
+
+   </li>
+
   </ol><hr><p>When a user agent is to <dfn id=kill-a-worker>kill a worker</dfn> it must run the following steps in parallel
   with the worker's main loop (the "<a href=#run-a-worker>run a worker</a>" processing model defined above):</p>
 

Modified: source
===================================================================
--- source	2013-12-03 22:39:17 UTC (rev 8329)
+++ source	2013-12-03 22:58:15 UTC (rev 8330)
@@ -91536,14 +91536,15 @@
   <p>A worker is said to be a <dfn>permissible worker</dfn> if its list of <span>the worker's
   <code>Document</code>s</span> is not empty.</p>
 
-  <p>A worker is said to be a <dfn>protected worker</dfn> if it is a <span>permissible worker</span>
+  <p>A worker is said to be an <dfn>active needed worker</dfn> if any of the <code>Document</code>
+  objects in <span>the worker's <code>Document</code>s</span> are <span>fully active</span>.</p>
+
+<!--CLEANUP-->
+  <p>A worker is said to be a <dfn>protected worker</dfn> if it is an <span>active needed worker</span>
   and either it has outstanding timers, database transactions, or network connections, or its list
   of <span>the worker's ports</span> is not empty, or its <code>WorkerGlobalScope</code> is actually
   a <code>SharedWorkerGlobalScope</code> object (i.e. the worker is a shared worker).</p>
 
-  <p>A worker is said to be an <dfn>active needed worker</dfn> if any of the <code>Document</code>
-  objects in <span>the worker's <code>Document</code>s</span> are <span>fully active</span>.</p>
-
   <p>A worker is said to be a <dfn>suspendable worker</dfn> if it is not an <span>active needed
   worker</span> but it is a <span>permissible worker</span>.</p>
 
@@ -91632,7 +91633,7 @@
 
 <!--CLEANUP-->
     <p><strong>Closing orphan workers</strong>: Start monitoring the worker such that no sooner than
-    it stops being either a <span>protected worker</span>, and
+    it stops being a <span>protected worker</span>, and
     no later than it stops being a <span>permissible worker</span>, <var data-x="">worker global
     scope</var>'s <span data-x="dom-WorkerGlobalScope-closing">closing</span> flag is set to true<!--
     v2-onclose and <span data-x="queue a task">a task is queued</span> to <span>fire a simple
@@ -91710,6 +91711,15 @@
 
    </li>
 -->
+
+   <li>
+   
+    <!-- this has no normative impact but makes it clearer that the worker is irrelevant now, and
+    doesn't have to survive until its Documents all die off too -->
+    <p>Empty the worker's list of <span>the worker's <code>Document</code>s</span>.</p>
+
+   </li>
+
   </ol>
 
   <hr>




More information about the Commit-Watchers mailing list