Allen Wirfs-Brock (2014-06-11T02:51:03.000Z)
On Jun 10, 2014, at 7:21 PM, Ian Hickson wrote:

> On Wed, 11 Jun 2014, Domenic Denicola wrote:
>> 
>> Hmm. How do we reconcile this with the fact that promises use microtasks 
>> in all implementations today? Are they nonconformant with the spec? Or 
>> is the spec flexible enough that e.g. PromiseTask ES tasks can be put on 
>> a HTML microtask queue, while ones involved in the whole script 
>> lifecycle business can be put on the HTML task queue?
> 
> Where in the ES spec are the ES jobs for promises queued up?
> 

(starting now, I'm going to use "Jobs" to mean what the ES6 spec. current calls "Tasks"

The two kinds of promise related Jobs are defined in

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-tasks 

They are enqueued from 

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise.prototype.then 
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-resolve-functions 

Regarding, Domenic's and Boris responses, I don't see why ES6 promise related Jobs need to be translated into HTML Tasks/Microtasks at all.  The ES6 spec. takes care of creating and queueing its promise related Jobs.  The only thing HTML needs to worry about is specify when the ES "PrimiseJobs" queue is serviced in relationship to any other ES Job queues it may use.  That means the the HTML scheduling algorithm may impose a scheduling priority of promise Jobs relative to various kinds of HTML Tasks/MicroTask.  But it doesn't mean that  that promise Jobs have any of the other semantic characteristics of those HTML abstractions.

Allen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140610/8cf6f16b/attachment.html>
domenic at domenicdenicola.com (2014-06-17T20:44:01.625Z)
On Jun 10, 2014, at 7:21 PM, Ian Hickson wrote:
> Where in the ES spec are the ES jobs for promises queued up?

(starting now, I'm going to use "Jobs" to mean what the ES6 spec. current calls "Tasks"

The two kinds of promise related Jobs are defined in

- http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-tasks 

They are enqueued from 

- http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise.prototype.then 
- http://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-resolve-functions 

Regarding, Domenic's and Boris responses, I don't see why ES6 promise related Jobs need to be translated into HTML Tasks/Microtasks at all.  The ES6 spec. takes care of creating and queueing its promise related Jobs.  The only thing HTML needs to worry about is specify when the ES "PrimiseJobs" queue is serviced in relationship to any other ES Job queues it may use.  That means the the HTML scheduling algorithm may impose a scheduling priority of promise Jobs relative to various kinds of HTML Tasks/MicroTask.  But it doesn't mean that  that promise Jobs have any of the other semantic characteristics of those HTML abstractions.