This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24484 - Say "provide a stable state" if that is equivalent
Summary: Say "provide a stable state" if that is equivalent
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 08:46 UTC by contributor
Modified: 2014-02-19 04:50 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2014-02-04 08:46:56 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#processing-model-4
Complete: http://www.whatwg.org/c#processing-model-4
Referrer: 

Comment:
Say "provide a stable state" if that is equivalent

Posted from: 42.112.56.121
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.76 Safari/537.36 OPR/19.0.1326.45 (Edition Next)
Comment 1 Philip Jägenstedt 2014-02-04 08:50:11 UTC
http://www.whatwg.org/specs/web-apps/current-work/#pause says

"If any asynchronously-running algorithms are awaiting a stable state, then run their synchronous section and then resume running their asynchronous algorithm. (See the event loop processing model definition above for details.)"

This looks identical to "provide a stable state", so just use that if it's equivalent.

(When trying to implement awaiting/providing a stable state, I nearly missed this bit because of the wording.)
Comment 2 Philip Jägenstedt 2014-02-04 12:37:22 UTC
I'd also like to know why a stable state should be provided here. In none of the places that pause tasks does it seems particularly important to do this, is there a potential deadlock I'm missing?
Comment 3 Ian 'Hixie' Hickson 2014-02-04 20:01:21 UTC
Consider the case of a page that create a video element, then does alert("Ok, I've started the load!"). The user sees the alert, thinks "I'll go for lunch while it loads", comes back... and we haven't yet started the load, if we don't provide a stable state here.
Comment 4 contributor 2014-02-04 20:01:28 UTC
Checked in as WHATWG revision r8460.
Check-in comment: Fix one case where we provide a stable state but describe it oddly.
http://html5.org/tools/web-apps-tracker?from=8459&to=8460
Comment 5 Philip Jägenstedt 2014-02-05 03:49:43 UTC
(In reply to Ian 'Hixie' Hickson from comment #3)
> Consider the case of a page that create a video element, then does
> alert("Ok, I've started the load!"). The user sees the alert, thinks "I'll
> go for lunch while it loads", comes back... and we haven't yet started the
> load, if we don't provide a stable state here.

OK, I suppose that's reasonable.
Comment 6 Rafael Weinstein 2014-02-19 01:27:12 UTC
i think that it'd be clearer in the spec to have one notion of "do my stuff after script has done doing it's thing". i suggest refactoring the stable state stuff to use microtasks instead.

as for comment 3, i think it's not worth muddying a fairly clean concept by attempting to accommodate this (fairly exotic) use.
Comment 7 Philip Jägenstedt 2014-02-19 04:50:58 UTC
This bug is closed, so I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=24724 instead.