[webkit-reviews] review granted: [Bug 217351] Use sendWithAsyncReply to evaluate JavaScript in a WebPage : [Attachment 410610] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 6 00:32:57 PDT 2020


youenn fablet <youennf at gmail.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 217351: Use sendWithAsyncReply to evaluate JavaScript in a WebPage
https://bugs.webkit.org/show_bug.cgi?id=217351

Attachment 410610: Patch

https://bugs.webkit.org/attachment.cgi?id=410610&action=review




--- Comment #7 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 410610
  --> https://bugs.webkit.org/attachment.cgi?id=410610
Patch

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

> Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:3788
> +    getPage(webView).runJavaScriptInMainFrame(WTFMove(params), [task =
WTFMove(task)](API::SerializedScriptValue* serializedScriptValue,
Optional<ExceptionDetails> details) {

&& and WTFMove.
Or can we use something like Expected<RefPtr<API::SerializedScriptValue>,
ExceptionDetails>?

> Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:3925
>	       exceptionDetails = *details;

Optional<>&& and WTFMove

> Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:3965
> +	   [task](API::SerializedScriptValue* serializedScriptValue,
Optional<ExceptionDetails> details) {

Optional<>&& and WTFMove

>
Source/WebKit/UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp:124
> +	   [](API::SerializedScriptValue*, Optional<WebCore::ExceptionDetails>
exceptionDetails) {

&&, maybe use auto&& as well.

> Source/WebKit/UIProcess/WebPageProxy.cpp:4105
> +   
sendWithAsyncReply(Messages::WebPage::RunJavaScriptInFrameInScriptWorld(paramet
ers, frameID, world.worldData()), [activity = WTFMove(activity),
callbackFunction = WTFMove(callbackFunction)] (const IPC::DataReference&
dataReference, Optional<ExceptionDetails> details) mutable {

&&

> Source/WebKit/UIProcess/WebPageProxy.cpp:4113
> +	  
callbackFunction(API::SerializedScriptValue::adopt(WTFMove(data)).ptr(),
details);

WTFMove(details)


More information about the webkit-reviews mailing list