RESOLVED FIXED 282983
REGRESSION(286456@main) [WebDriver] WebAutomationSessionProxy::evaluateJavaScriptFunction completionHandler should always be called
https://bugs.webkit.org/show_bug.cgi?id=282983
Summary REGRESSION(286456@main) [WebDriver] WebAutomationSessionProxy::evaluateJavaSc...
Lauro Moura
Reported 2024-11-12 05:23:03 PST
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
Lauro Moura
Comment 1 2024-11-12 05:29:51 PST
EWS
Comment 2 2024-11-12 12:15:52 PST
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
Comment 3 2024-11-12 12:16:15 PST
Note You need to log in before you can comment on or make changes to this bug.