[webkit-changes] [WebKit/WebKit] 700de8: Web Inspector: support awaitPromise parameter in R...

Yury Semikhatsky noreply at github.com
Wed Nov 15 12:24:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 700de83458a2ea7b582efa0fb8f50e748547847f
      https://github.com/WebKit/WebKit/commit/700de83458a2ea7b582efa0fb8f50e748547847f
  Author: Yury Semikhatsky <yurys at chromium.org>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    A LayoutTests/inspector/runtime/callFunctionOn-awaitPromise-expected.txt
    A LayoutTests/inspector/runtime/callFunctionOn-awaitPromise.html
    M Source/JavaScriptCore/inspector/InjectedScript.cpp
    M Source/JavaScriptCore/inspector/InjectedScript.h
    M Source/JavaScriptCore/inspector/InjectedScriptSource.js
    M Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp
    M Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h
    M Source/JavaScriptCore/inspector/protocol/Runtime.json
    M Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
    M Source/WebCore/inspector/agents/page/PageRuntimeAgent.h

  Log Message:
  -----------
  Web Inspector: support awaitPromise parameter in Runtime.callFunctionOn
https://bugs.webkit.org/show_bug.cgi?id=264374

Reviewed by Devin Rousso.

Added awaitPromise parameter to Runtime.callFunctionOn to allow getting
result of an asyncronouse function call with a single protocol command.
This allows to avoi possible navigation between Runtime.callFunctionOn command
and subsequent Runtime.awaitPromise which invalidates the function result
handle.

* Source/JavaScriptCore/inspector/InjectedScript.cpp:
(Inspector::InjectedScript::callFunctionOn):
* Source/JavaScriptCore/inspector/InjectedScript.h:
* Source/JavaScriptCore/inspector/InjectedScriptSource.js:
(let.InjectedScript.prototype.callFunctionOn):
* Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::callFunctionOn):
* Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h:
* Source/JavaScriptCore/inspector/protocol/Runtime.json:
* Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::callFunctionOn):
* Source/WebCore/inspector/agents/page/PageRuntimeAgent.h:
* LayoutTests/inspector/runtime/callFunctionOn-awaitPromise-expected.txt: Added.
* LayoutTests/inspector/runtime/callFunctionOn-awaitPromise.html: Added.

Canonical link: https://commits.webkit.org/270784@main




More information about the webkit-changes mailing list