Skip to content

Commit

Permalink
Address latest review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Nov 23, 2015
1 parent d7e1571 commit 2e4c5b9
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -86441,7 +86441,7 @@ interface <dfn>NavigatorOnLine</dfn> {
problematic position (line number and column number), using the <span>global object</span>
specified by the <span>environment settings object</span> as the target. If the error is still <i
data-x="concept-error-nothandled">not handled</i> after this, then the error may be reported to
the user.</p>
a developer console.</p>

</li>

Expand Down Expand Up @@ -86651,52 +86651,52 @@ dictionary <dfn>ErrorEventInit</dfn> : <span>EventInit</span> {

<li>

<p>Queue a task to run the following substeps for each promise <var>p</var> in
<var>list</var>:</p>
<p><span>Queue a task</span> to run the following substep:</p>

<ol>

<li><p>If <var>p</var>'s [[PromiseIsHandled]] internal slot is true, continue to the next
iteration of the loop.</p></li>
<li><p>For each promise <var>p</var> in <var>list</var>:</p>

<li><p>Let <var>event</var> be a new <span data-x="concept-events-trusted">trusted</span>
<code>PromiseRejectionEvent</code> object that does not bubble but is cancelable, and which
has the event name <code data-x="event-unhandledrejection">unhandledrejection</code>.</p></li>
<ol>

<li><p>If <var>p</var>'s [[PromiseIsHandled]] internal slot is true, continue to the next
iteration of the loop.</p></li>

<li><p>Let <var>event</var> be a new <span data-x="concept-events-trusted">trusted</span>
<code>PromiseRejectionEvent</code> object that does not bubble but is cancelable, and which
has the event name <code data-x="event-unhandledrejection">unhandledrejection</code>.</p></li>

<li><p>Initialise <var>event</var>'s <code
data-x="dom-PromiseRejectionEvent-promise">promise</code> attribute to <var>p</var>.</p></li>
<li><p>Initialise <var>event</var>'s <code
data-x="dom-PromiseRejectionEvent-promise">promise</code> attribute to <var>p</var>.</p></li>

<li><p>Initialise <var>event</var>'s <code
data-x="dom-PromiseRejectionEvent-reason">reason</code> attribute to the value of
<var>p</var>'s [[PromiseResult]] internal slot.</p></li>
<li><p>Initialise <var>event</var>'s <code
data-x="dom-PromiseRejectionEvent-reason">reason</code> attribute to the value of
<var>p</var>'s [[PromiseResult]] internal slot.</p></li>

<li><p><span>Dispatch</span> <var>event</var> at <var>settings object</var>'s <span>global
object</span>.</p></li>
<li><p><span>Dispatch</span> <var>event</var> at <var>settings object</var>'s <span>global
object</span>.</p></li>

<li><p>If the event was canceled, then the promise rejection is <span
data-x="concept-promise-rejection-handled">handled</span>. Otherwise, the promise rejection is
<span data-x="concept-promise-rejection-nothandled">not handled</span>.</p></li>
<li><p>If the event was canceled, then the promise rejection is <i
data-x="concept-promise-rejection-handled">handled</i>. Otherwise, the promise rejection is
<i data-x="concept-promise-rejection-nothandled">not handled</i>.</p></li>

<li><p>If <var>p</var>'s [[PromiseIsHandled]] internal slot is false, add <var>p</var> to
<var>settings object</var>'s <span>outstanding rejected promises weak set</span>.
<li><p>If <var>p</var>'s [[PromiseIsHandled]] internal slot is false, add <var>p</var> to
<var>settings object</var>'s <span>outstanding rejected promises weak set</span>.

</ol>
</li>
</ol>
</li>

</ol>

<p>This algorithm results in promise rejections being marked as <dfn
data-x="concept-promise-rejection-handled">handled</dfn> or <dfn
data-x="concept-promise-rejection-nothandled">not handled</dfn>. These concepts parallel
<span data-x="concept-error-handled">handled</span> and <span
data-x="concept-error-nothandled">not handled</span> script errors.</p>

<p class="note">Implementations should use the <span
data-x="concept-promise-rejection-handled">handled</span>/<span
data-x="concept-promise-rejection-nothandled">not handled</span> state of promise rejections
when determining what to display in any debugging interfaces. That is, intercepting an
<code>unhandledrejection</code> event and calling <code>preventDefault()</code> should prevent
the corresponding rejection from showing up in any developer tools.</p>
data-x="concept-promise-rejection-handled"><i>handled</i></dfn> or <dfn
data-x="concept-promise-rejection-nothandled"><i>not handled</i></dfn>. These concepts parallel
<i data-x="concept-error-handled">handled</i> and <i data-x="concept-error-nothandled">not
handled</i> script errors. If a rejection is still <i
data-x="concept-promise-rejection-nothandled">not handled</i> after this, then the rejection may
be reported to a developer console.</p>


<h6>The HostPromiseRejectionTracker implementation</h6>
Expand All @@ -86713,8 +86713,7 @@ dictionary <dfn>ErrorEventInit</dfn> : <span>EventInit</span> {

<div class="note">The exact mechanism for correlating ECMAScript's notion of execution contexts
and HTML's notion of <span data-x="concept-script">scripts</span> is not yet well-defined. See
<a href="https://github.com/tc39/ecma262/issues/78">tc39/ecma262#78</a> and <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25981">Bugzilla bug 25981</a> for
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=25981">Bugzilla bug 25981</a> for
tentative ideas.</div>
</li>

Expand Down

0 comments on commit 2e4c5b9

Please sign in to comment.