[webkit-changes] [WebKit/WebKit] 9d09c5: [JSC] Use consistent error message for RegExpExec ...

SUZUKI Sosuke noreply at github.com
Sun May 12 12:58:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d09c5e0ff19d514c6bbfb75f7b9305a6f66141e
      https://github.com/WebKit/WebKit/commit/9d09c5e0ff19d514c6bbfb75f7b9305a6f66141e
  Author: sosukesuzuki <aosukeke at gmail.com>
  Date:   2024-05-12 (Sun, 12 May 2024)

  Changed paths:
    A JSTests/stress/regexp-exec-consistent-error-message.js
    M Source/JavaScriptCore/dfg/DFGOperations.cpp

  Log Message:
  -----------
  [JSC] Use consistent error message for RegExpExec when this value is not a RegExp object
https://bugs.webkit.org/show_bug.cgi?id=258559

Reviewed by Yusuke Suzuki.

When this value is not a RegExp object, regExpProtoFuncExec(runtime/RegExpPrototype.cpp) and
operationRegExpExecGeneric(dfg/DFGOperations.cpp) throw Type Error. They should use consistent
error messages but are different.

This patch fixes to use consistent error messages between them.

* JSTests/stress/regexp-exec-consistent-error-message.js: Added.
(shouldBe):
(test):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list