W3C home > Mailing lists > Public > public-html-diffs@w3.org > June 2011

workers; hixie: Make worker errors propagate all the way up to the Document, hitting the global scope .onerror each step of the way. This isn't a great way to specify it but I couldn't work out a cleaner way that didn't involve major (potentially risky) surgery and inventing new terms. If it turns out that there are other things that'd need the parent/child infrastructure to be better defined I'll do it then. (whatwg r6263)

From: poot <cvsmail@w3.org>
Date: Tue, 21 Jun 2011 17:21:07 -0400
To: public-html-diffs@w3.org
Message-Id: <E1QZ8Nf-0004xZ-CC@jay.w3.org>
workers; hixie: Make worker errors propagate all the way up to the
Document, hitting the global scope .onerror each step of the way. This
isn't a great way to specify it but I couldn't work out a cleaner way
that didn't involve major (potentially risky) surgery and inventing new
terms. If it turns out that there are other things that'd need the
parent/child infrastructure to be better defined I'll do it then.
(whatwg r6263)

http://dev.w3.org/cvsweb/html5/workers/Overview.html?r1=1.291&r2=1.292&f=h
http://html5.org/tools/web-apps-tracker?from=6262&to=6263

===================================================================
RCS file: /sources/public/html5/workers/Overview.html,v
retrieving revision 1.291
retrieving revision 1.292
diff -u -d -r1.291 -r1.292
--- Overview.html	13 Jun 2011 23:39:34 -0000	1.291
+++ Overview.html	21 Jun 2011 21:20:56 -0000	1.292
@@ -211,7 +211,7 @@
 
    <h1>Web Workers</h1>
    
-   <h2 class="no-num no-toc" id="editor-s-draft-13-june-2011">Editor's Draft 13 June 2011</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-21-june-2011">Editor's Draft 21 June 2011</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/workers/">http://www.w3.org/TR/workers/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -316,7 +316,7 @@
   </dl><p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Applications
   Working Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation track.
-  This specification is the 13 June 2011 Editor's Draft.
+  This specification is the 21 June 2011 Editor's Draft.
   </p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
   February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of
   any patent disclosures</a> made in connection with the deliverables
@@ -1350,19 +1350,22 @@
   
   <p>For dedicated workers, if the error is still <i title="concept-error-nothandled">not handled</i> afterwards, or if
   the error occurred while handling a previous script error, the user
-  agent must <span>queue a task</span> to <a href="#fire-a-worker-error-event">fire a worker error
-  event</a> at the <code><a href="#worker">Worker</a></code> object associated with the
-  worker.<p>When the user agent is to <dfn id="fire-a-worker-error-event">fire a worker error event</dfn> at
-  a <code><a href="#worker">Worker</a></code> object, it must create and dispatch an event
-  that uses the <code><a href="#errorevent">ErrorEvent</a></code> interface, with the name <code title="event-error">error</code>, that doesn't bubble and is
+  agent must <span>queue a task</span> to fire an event that uses the
+  <code><a href="#errorevent">ErrorEvent</a></code> interface, with the name <code title="event-error">error</code>, that doesn't bubble and is
   cancelable, with its <code title="dom-ErrorEvent-message"><a href="#dom-errorevent-message">message</a></code>, <code title="dom-ErrorEvent-filename"><a href="#dom-errorevent-filename">filename</a></code>, and <code title="dom-ErrorEvent-lineno"><a href="#dom-errorevent-lineno">lineno</a></code> attributes set
-  appropriately. The default action of this event depends on whether
-  the <code><a href="#worker">Worker</a></code> object is itself in a worker. If it is, and
-  that worker is also a dedicated worker, then the user agent must
-  again <span>queue a task</span> to <a href="#fire-a-worker-error-event">fire a worker error
-  event</a> at the <code><a href="#worker">Worker</a></code> object associated with
-  <em>that</em> worker. Otherwise, then the error may be reported to
-  the user.<p>The <span>task source</span> for the tasks mentioned above is the
+  appropriately, at the <code><a href="#worker">Worker</a></code> object associated with the
+  worker. If the event is not canceled, the user agent must act as if the
+  uncaught runtime script error had occurred in the global scope that
+  the <code><a href="#worker">Worker</a></code> object is in, thus repeating the entire
+  runtime script error reporting process one level up.<p>If the implicit port connecting the worker to its
+  <code><a href="#worker">Worker</a></code> object has been disentangled (i.e. if the parent
+  worker has been terminated), then the user agent must act as if the
+  <code><a href="#worker">Worker</a></code> object had no <code title="event-error">error</code> event handler and as if that
+  worker's <code title="handler-WorkerGlobalScope-onerror"><a href="#handler-workerglobalscope-onerror">onerror</a></code> attribute
+  was null, but must otherwise act as described above.<p class="note">Thus, error reports proagate up to the chain of
+  dedicated workers up to the original <code>Document</code>, even if
+  some of the workers along this chain have been terminated and
+  garbage collected.<p>The <span>task source</span> for the task mentioned above is the
   <span>DOM manipulation task source</span>.<hr><pre class="idl">interface <dfn id="errorevent">ErrorEvent</dfn> : <span>Event</span> {
   readonly attribute DOMString <a href="#dom-errorevent-message" title="dom-ErrorEvent-message">message</a>;
   readonly attribute DOMString <a href="#dom-errorevent-filename" title="dom-ErrorEvent-filename">filename</a>;
Received on Tuesday, 21 June 2011 21:21:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 21 June 2011 21:21:10 GMT