I’m suggesting a default runloop for non-web content. I haven’t read through the details of integrating with the web content definition of micro task.
Geoff > On Jul 6, 2015, at 4:44 PM, Maciej Stachowiak <[email protected]> wrote: > > > Should JS be defining an event loop abstraction that WebCore then uses? That > would be weird, because the required behavior of the even loop in web content > is chock full of issues that are not at all related to JavaScript. JSC > doesn't even know enough to run microtasks at all the right times (from > reading the spec it seems that way, at least) for the Web case. Or are you > saying it would have a fallback runloop for non-Web contents? > > Regards, > Maciej > >> On Jul 6, 2015, at 3:24 PM, Geoffrey Garen <[email protected] >> <mailto:[email protected]>> wrote: >> >> I think it would be better for JavaScriptCore to handle micro tasks natively. >> >> It’s not so great for each client to need to reinvent the microtask runloop >> abstraction. >> >> Geoff >> >>> On Jul 6, 2015, at 10:05 AM, Yusuke SUZUKI <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> Hi WebKittens, >>> >>> I've landed the update of the ES6 Promise implementation. >>> Through this work, I've experimentally added the internal private function, >>> @enqueueJob(JS function, JS array for arguments). >>> This is corresponding to the ES6 spec EnqueueJob[1]. >>> >>> This EnqueueJob handler is now tightly integrated with WebCore's microtask >>> infrastructure. So in JSC framework side, we cannot use this function. >>> As a result, current JSC framework disables Promise because there's no >>> event loop abstraction. >>> >>> So I propose the API configuring euqueueJob handler into JSC VM (That >>> corresponds to the Realm in ECMA spec). >>> >>> Like, >>> >>> void JSContextGroupSetEnqueueJobCallback(JSContextGroupRef, >>> JSEnqueueJobCallback, void* callbackData); >>> >>> What do you think about this? >>> >>> [1]: http://ecma-international.org/ecma-262/6.0/#sec-enqueuejob >>> <http://ecma-international.org/ecma-262/6.0/#sec-enqueuejob> >>> >>> Best Regards, >>> Yusuke Suzuki >>> _______________________________________________ >>> webkit-dev mailing list >>> [email protected] <mailto:[email protected]> >>> https://lists.webkit.org/mailman/listinfo/webkit-dev >>> <https://lists.webkit.org/mailman/listinfo/webkit-dev> >> >> _______________________________________________ >> webkit-dev mailing list >> [email protected] <mailto:[email protected]> >> https://lists.webkit.org/mailman/listinfo/webkit-dev >
_______________________________________________ webkit-dev mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-dev

