Bug 282983
Summary: | REGRESSION(286456@main) [WebDriver] WebAutomationSessionProxy::evaluateJavaScriptFunction completionHandler should always be called | ||
---|---|---|---|
Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
Component: | WebDriver | Assignee: | Lauro Moura <lmoura> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | achristensen, bburg, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Lauro Moura
286456@main made Messages::WebAutomationSessionProxy::EvaluateJavaScriptFunction use sendWithAsyncReply, but stored the completionHandler only if expectsImplicitCallbackArgument is true.
This results in the sendWithAsyncReply completionHandler never being called if expectsImplicitCallbackArgument is false. For example, when using EvaluateJavaScriptFunction to get the page title.
IIUC, the expectsImplicitCallbackArgument parameter is related to the actual JS function being evaluated having an implicit callback parameter to be called with the result of the evaluation. Something like a promise's "resolve" function, as handled by Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.js in fact. In this case, expectsImplicitCallbackArgument is not related to the IPC reply itself, which handles the communication inside the browser.
The previous code also guarded the "callbackID" only if expectsImplicitCallbackArgument was true, but did not block as it called a given callbackID unconditionally on WebAutomationSessionProxy::didEvaluateJavaScriptFunction.
Tentative patch incoming.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/36524
EWS
Committed 286495@main (c64901beb5ef): <https://commits.webkit.org/286495@main>
Reviewed commits have been landed. Closing PR #36524 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/139741114>