[webkit-changes] [WebKit/WebKit] a4eed6: ScriptFunctionCall::call() can return an empty JSV...

Yury Semikhatsky noreply at github.com
Tue Nov 14 18:25:17 PST 2023


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

  Changed paths:
    M Source/JavaScriptCore/inspector/InjectedScript.cpp
    M Source/JavaScriptCore/inspector/InjectedScriptBase.cpp
    M Source/JavaScriptCore/inspector/InjectedScriptModule.cpp

  Log Message:
  -----------
  ScriptFunctionCall::call() can return an empty JSValue if the watchdog timer fires, callers should check for this
https://bugs.webkit.org/show_bug.cgi?id=165875

Reviewed by Devin Rousso.

ScriptFunctionCall::call() may return empty JSValue from several places,
the callers now check for emptiness first before accessing the value.

Unfortunately, I don't have a reliable repro which could be converted
to a layout test like the one in https://github.com/WebKit/WebKit/commit/11d211bca821fa4803d6da95c857a04b7f32c46a
even though the symptoms are similar.

* Source/JavaScriptCore/inspector/InjectedScript.cpp:
(Inspector::InjectedScript::wrapObject const):
(Inspector::InjectedScript::wrapJSONString const):
(Inspector::InjectedScript::wrapTable const):
(Inspector::InjectedScript::previewValue const):
(Inspector::InjectedScript::createCommandLineAPIObject const):

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




More information about the webkit-changes mailing list