[Webkit-unassigned] [Bug 204151] Automation: evaluateJavaScriptFunction should use Promises

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 9 12:05:52 PST 2020


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

Brian Burg <bburg at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #387089|review?                     |review+
              Flags|                            |

--- Comment #6 from Brian Burg <bburg at apple.com> ---
Comment on attachment 387089
  --> https://bugs.webkit.org/attachment.cgi?id=387089
Rebased patch

View in context: https://bugs.webkit.org/attachment.cgi?id=387089&action=review

r=me, nice work!

> Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:198
> +    } else if (JSValueIsObject(context, arguments[2])) {

I like this change.

> Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.js:102
> +        // finishes resolved, so we need to start a new one here to wait for the second promise to be reolved or the timeout.

Nit: resolved

So in other words, `resultPromise` could resolve to a Promise that is not settled (because we passed the `resolve` for the inner racing promise), so it has to be waited. It's a little tragic to have to do this, but I guess I can't think of an alternative if we can't assume anything about the callback's argument type.

-- 
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/20200109/089929d1/attachment.htm>


More information about the webkit-unassigned mailing list