[Webkit-unassigned] [Bug 206364] Make the callAsyncJavaScriptFunction function actually be async (so await works)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 16 11:57:38 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=206364

--- Comment #4 from Brady Eidson <beidson at apple.com> ---
(In reply to Devin Rousso from comment #3)
> Comment on attachment 387938 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=387938&action=review
> 
> > Source/WebCore/bindings/js/ScriptController.cpp:607
> > +    functionStringBuilder.append("(async function(");
> 
> One issue with making a function `async` is that they _always_ return a
> `Promise`.  

Which is fine, because literally the only client of this is "callAsyncJavaScriptFunction" which expects promise results.

> I think it would be better to have
> `ScriptController:callInWorld` take an `enum class IsAsync { Yes, No };` so
> that callers can decide whether or not they want this.

There's no reason to do now that because there would be no client of "No"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200116/b103b180/attachment.htm>


More information about the webkit-unassigned mailing list