workers/Overview.html 1.17 22 Workers created by workers still need to

Workers created by workers still need to stop if the original browsing
context goes away. (whatwg r22) (changed by: Ian Hickson)

Diffs for this change per section: 
  the worker's ports
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.17.html#the-workers0
  front-line worker
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.17.html#front-line
  2.5 Processing model
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.17.html#processing
  run a worker
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.17.html#run-a
  active needed worker
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.17.html#active0
  needed worker
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.17.html#needed
  active front-line worker
  http://people.w3.org/mike/diffs/html5/workers/Overview.1.17.html#active

Current content per affected section: 
  http://dev.w3.org/html5/workers/Overview.html#the-workers0
  http://dev.w3.org/html5/workers/Overview.html#front-line
  http://dev.w3.org/html5/workers/Overview.html#processing
  http://dev.w3.org/html5/workers/Overview.html#run-a
  http://dev.w3.org/html5/workers/Overview.html#active0
  http://dev.w3.org/html5/workers/Overview.html#needed
  http://dev.w3.org/html5/workers/Overview.html#active

Previously published WD content per affected section: 
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#the-workers0
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#front-line
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#processing
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#run-a
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#active0
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#needed
  http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#active

Cumulative diff: http://people.w3.org/mike/diffs/html5/workers/Overview.diff.html

http://dev.w3.org/cvsweb/html5/workers/Overview.html?r1=1.16&r2=1.17&f=h

http://html5.org/tools/web-apps-tracker?from=21&to=22

===================================================================
RCS file: /sources/public/html5/workers/Overview.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Overview.html 18 Jul 2008 08:52:37 -0000 1.16
+++ Overview.html 18 Jul 2008 09:28:01 -0000 1.17
@@ -488,6 +488,48 @@
    objects that are in events pending in the <a href="#queue">queue of
    events</a>.
 
+  <hr>
+
+  <p>A worker is said to be a <dfn id=front-line>front-line worker</dfn> if
+   at least one of the <a href="#the-workers0">the worker's ports</a> has an
+   entangled <code>MessagePort</code> whose <code
+   title=dom-MessagePort-ownerWindow>ownerWindow</code> is a
+   <code>WindowBrowsingContext</code> object.
+
+  <p>A worker is said to be a <dfn id=needed>needed worker</dfn> if either:
+
+  <ul>
+   <li>it is a <a href="#front-line">front-line worker</a>, or
+
+   <li>at least one of the <a href="#the-workers0">the worker's ports</a> has
+    an entangled <code>MessagePort</code> whose <code
+    title=dom-MessagePort-ownerWindow>ownerWindow</code> is a <code><a
+    href="#windowworker">WindowWorker</a></code> object that is itself a <a
+    href="#needed">needed worker</a>.
+  </ul>
+
+  <hr>
+
+  <p>A worker is said to be an <dfn id=active>active front-line worker</dfn>
+   if at least one of the <a href="#the-workers0">the worker's ports</a> has
+   both an <code title=dom-MessagePort-active>active</code> attribute whose
+   value is true and an entangled <code>MessagePort</code> whose <code
+   title=dom-MessagePort-ownerWindow>ownerWindow</code> is a
+   <code>WindowBrowsingContext</code> object.
+
+  <p>A worker is said to be an <dfn id=active0>active needed worker</dfn> if
+   either:
+
+  <ul>
+   <li>it is an <a href="#active">active front-line worker</a>, or
+
+   <li>at least one of the <a href="#the-workers0">the worker's ports</a> has
+    an entangled <code>MessagePort</code> whose <code
+    title=dom-MessagePort-ownerWindow>ownerWindow</code> is a <code><a
+    href="#windowworker">WindowWorker</a></code> object that is itself an <a
+    href="#active0">active needed worker</a>.
+  </ul>
+
   <h3 id=processing><span class=secno>2.5 </span>Processing model</h3>
 
   <p>When a user agent is to <dfn id=run-a>run a worker</dfn> named <var
@@ -546,29 +588,32 @@
    <li>
     <p>Invoke the <a href="#success" title="worker creation
      succeeded">success steps</a> defined by the algorithm that called this
-     one. (This will add an event to the <a href="#queue">queue of
-     events</a>.)</p>
+     one.</p>
+
+    <p class=note>This will usually add an event to the <a
+     href="#queue">queue of events</a>. If it does, that event will have a
+     <code>MessagePort</code> and thus the list of <a
+     href="#the-workers0">the worker's ports</a> will not be empty. If it
+     doesn't, then the next step will set the <var title="">window</var>
+     object's <code title=dom-WindowWorker-closing><a
+     href="#closing">closing</a></code> attribute to true.</p>
+
+   <li>
+    <p>Start monitoring <var title="">worker</var>, such that as soon as the
+     worker stops being a <a href="#needed">needed worker</a>, the <var
+     title="">window</var> object's <code title=dom-WindowWorker-closing><a
+     href="#closing">closing</a></code> attribute is set to true.</p>
 
    <li>
     <p>Start monitoring <var title="">worker</var>, such that whenever the
      <var title="">window</var> object's <code
      title=dom-WindowWorker-closing><a href="#closing">closing</a></code>
-     attribute is false and all <a href="#the-workers0">the worker's
-     ports</a> have their <code title=dom-MessagePort-active>active</code>
-     attributes set to false, the user agent suspends execution of script in
-     that worker until such time as either the <code
-     title=dom-WindowWorker-closing><a href="#closing">closing</a></code>
-     attribute switches to true or one of the <code>MessagePort</code>
-     objects in the list of <a href="#the-workers0">the worker's ports</a>
-     has an <code title=dom-MessagePort-active>active</code> attribute with
-     the value true.</p>
-
-   <li>
-    <p>Start monitoring <var title="">worker</var>, such that as soon as the
-     list of <a href="#the-workers0">the worker's ports</a> becomes empty,
-     the <var title="">window</var> object's <code
+     attribute is false and the worker is not an <a href="#active0">active
+     needed worker</a>, the user agent suspends execution of script in that
+     worker until such time as either the <code
      title=dom-WindowWorker-closing><a href="#closing">closing</a></code>
-     attribute is set to true.</p>
+     attribute switches to true or the worker becomes an <a
+     href="#active0">active needed worker</a>.</p>
 
    <li>
     <p>Run <var title="">script</var> until it either returns, fails to catch

Received on Friday, 18 July 2008 09:29:35 UTC