WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
223017
Web Automation: Get Title command sometimes hangs inside evaluateJavaScriptFunction
https://bugs.webkit.org/show_bug.cgi?id=223017
Summary
Web Automation: Get Title command sometimes hangs inside evaluateJavaScriptFu...
Blaze Burg
Reported
2021-03-09 23:39:41 PST
.
Attachments
Patch
(3.43 KB, patch)
2021-03-09 23:48 PST
,
Blaze Burg
no flags
Details
Formatted Diff
Diff
Patch v1.0
(3.43 KB, patch)
2021-03-09 23:48 PST
,
Blaze Burg
hi
: review+
bburg
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Blaze Burg
Comment 1
2021-03-09 23:39:59 PST
<
rdar://75239013
>
Blaze Burg
Comment 2
2021-03-09 23:48:28 PST
Created
attachment 422805
[details]
Patch
Blaze Burg
Comment 3
2021-03-09 23:48:52 PST
Created
attachment 422806
[details]
Patch v1.0
Devin Rousso
Comment 4
2021-03-10 10:28:15 PST
Comment on
attachment 422806
[details]
Patch v1.0 View in context:
https://bugs.webkit.org/attachment.cgi?id=422806&action=review
r=me, nice fix :)
> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:771 > + // would no longer be valid and the command would also fail also with WindowNotFound, just earlier.
"also fail also"
> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:774 > + for (auto key : copyToVector(m_evaluateJavaScriptFunctionCallbacks.keys())) { > + auto callback = m_evaluateJavaScriptFunctionCallbacks.take(key);
Rather than `copyToVector`, can you `std::exchange`? ``` for (auto&& [key, callback] : std::exchange(m_evaluateJavaScriptFunctionCallbacks, { })) ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound); ``` I think you could also drop the `isEmpty` check if you do this too.
> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:775 > + ASYNC_FAIL_WITH_PREDEFINED_ERROR(WindowNotFound);
I believe this will `return`. Based on your comment it sounds like we want that, but I just want to make sure.
Blaze Burg
Comment 5
2021-03-11 00:18:03 PST
Looking at this more, I think the bug is actually that WebAutomationSessionProxy is not seeing these main frame navigations. It already has cancellation logic. I'm going to look into this with a debugger to see if it ever gets triggered.
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