<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m suggesting a default runloop for non-web content.<div class=""><br class=""></div><div class="">I haven’t read through the details of integrating with the web content definition of micro task.</div><div class=""><br class=""></div><div class="">Geoff</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 6, 2015, at 4:44 PM, Maciej Stachowiak <<a href="mailto:mjs@apple.com" class="">mjs@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Maciej</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2015, at 3:24 PM, Geoffrey Garen <<a href="mailto:ggaren@apple.com" class="">ggaren@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think it would be better for JavaScriptCore to handle micro tasks natively.<div class=""><br class=""></div><div class="">It’s not so great for each client to need to reinvent the microtask runloop abstraction.<br class=""><div class=""><br class=""></div><div class="">Geoff</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2015, at 10:05 AM, Yusuke SUZUKI <<a href="mailto:utatane.tea@gmail.com" class="">utatane.tea@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi WebKittens,
<div class=""><br class=""></div><div class="">I've landed the update of the ES6 Promise implementation.</div><div class="">Through this work, I've experimentally added the internal private function, @enqueueJob(JS function, JS array for arguments).</div><div class="">This is corresponding to the ES6 spec EnqueueJob[1].</div><div class=""><br class=""></div><div class="">This EnqueueJob handler is now tightly integrated with WebCore's microtask infrastructure. So in JSC framework side, we cannot use this function.</div><div class="">As a result, current JSC framework disables Promise because there's no event loop abstraction.</div><div class=""><br class=""></div><div class="">So I propose the API configuring euqueueJob handler into JSC VM (That corresponds to the Realm in ECMA spec).</div><div class=""><br class=""></div><div class="">Like,</div><div class=""><br class=""></div><div class="">void JSContextGroupSetEnqueueJobCallback(JSContextGroupRef, JSEnqueueJobCallback, void* callbackData);</div><div class=""><br class=""></div><div class="">What do you think about this?</div><div class=""><br class=""></div><div class="">[1]: <a href="http://ecma-international.org/ecma-262/6.0/#sec-enqueuejob" class="">http://ecma-international.org/ecma-262/6.0/#sec-enqueuejob</a></div><div class=""><br class=""></div><div class="">Best Regards,</div><div class="">Yusuke Suzuki</div></div>
_______________________________________________<br class="">webkit-dev mailing list<br class=""><a href="mailto:webkit-dev@lists.webkit.org" class="">webkit-dev@lists.webkit.org</a><br class=""><a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" class="">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br class=""></div></blockquote></div><br class=""></div></div></div>_______________________________________________<br class="">webkit-dev mailing list<br class=""><a href="mailto:webkit-dev@lists.webkit.org" class="">webkit-dev@lists.webkit.org</a><br class=""><a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" class="">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></body></html>