WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
217351
Use sendWithAsyncReply to evaluate JavaScript in a WebPage
https://bugs.webkit.org/show_bug.cgi?id=217351
Summary
Use sendWithAsyncReply to evaluate JavaScript in a WebPage
Alex Christensen
Reported
2020-10-05 16:18:48 PDT
Use sendWithAsyncReply to evaluate JavaScript in a WebPage
Attachments
Patch
(21.35 KB, patch)
2020-10-05 16:19 PDT
,
Alex Christensen
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(22.63 KB, patch)
2020-10-05 16:39 PDT
,
Alex Christensen
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(23.93 KB, patch)
2020-10-05 16:57 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(24.48 KB, patch)
2020-10-05 18:41 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(25.72 KB, patch)
2020-10-05 21:43 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(26.06 KB, patch)
2020-10-06 12:47 PDT
,
Alex Christensen
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(27.55 KB, patch)
2020-10-06 13:02 PDT
,
Alex Christensen
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(27.55 KB, patch)
2020-10-06 13:07 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(26.54 KB, patch)
2020-10-06 13:31 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2020-10-05 16:19:32 PDT
Created
attachment 410581
[details]
Patch
Alex Christensen
Comment 2
2020-10-05 16:39:39 PDT
Created
attachment 410587
[details]
Patch
EWS Watchlist
Comment 3
2020-10-05 16:40:25 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Alex Christensen
Comment 4
2020-10-05 16:57:02 PDT
Created
attachment 410590
[details]
Patch
Alex Christensen
Comment 5
2020-10-05 18:41:42 PDT
Created
attachment 410599
[details]
Patch
Alex Christensen
Comment 6
2020-10-05 21:43:54 PDT
Created
attachment 410610
[details]
Patch
youenn fablet
Comment 7
2020-10-06 00:32:57 PDT
Comment on
attachment 410610
[details]
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(parameters, 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)
Alex Christensen
Comment 8
2020-10-06 12:47:34 PDT
Created
attachment 410680
[details]
Patch
Alex Christensen
Comment 9
2020-10-06 13:02:13 PDT
Created
attachment 410683
[details]
Patch
Alex Christensen
Comment 10
2020-10-06 13:07:17 PDT
Created
attachment 410686
[details]
Patch
Alex Christensen
Comment 11
2020-10-06 13:31:58 PDT
Created
attachment 410688
[details]
Patch
Alex Christensen
Comment 12
2020-10-06 14:22:00 PDT
http://trac.webkit.org/r268074
Radar WebKit Bug Importer
Comment 13
2020-10-06 14:22:16 PDT
<
rdar://problem/70017140
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug