Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 377275e3592ad0a15de64b1cc1a7475f3390a689
      
https://github.com/WebKit/WebKit/commit/377275e3592ad0a15de64b1cc1a7475f3390a689
  Author: Devin Rousso <[email protected]>
  Date:   2026-07-01 (Wed, 01 Jul 2026)

  Changed paths:
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-sensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-insensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-insensitive.html
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-sensitive-expected.txt
    A 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-sensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-sensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-sensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-insensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-insensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-sensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-sensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-sensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-sensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-insensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-insensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-sensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-sensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-insensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-insensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-insensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-insensitive.html
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-sensitive-expected.txt
    R 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-sensitive.html
    M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
    M Source/JavaScriptCore/debugger/Debugger.cpp
    M Source/JavaScriptCore/debugger/Debugger.h
    M Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
    M Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h
    M Source/JavaScriptCore/runtime/InternalFunction.cpp
    M Source/JavaScriptCore/runtime/InternalFunction.h

  Log Message:
  -----------
  Web Inspector: symbolic breakpoints should work with native constructors
https://bugs.webkit.org/show_bug.cgi?id=296421
<rdar://problem/157178256>

Reviewed by Yusuke Suzuki.

Allow a Symbolic Breakpoint for to pause each time `Array` or `new Date` or 
`Worker` or etc. is invoked, just like any other kind of function call.

Unfortunately, `InternalFunction` does not have any sort of executable so it's 
not possible to programatically instrument like what's already been done for 
native methods (specifically `NativeExecutable`)

Furthermore, adding a `willCallNativeConstructor` call to every constructor 
would be repetitive and have no guarantees of being kept up-to-date as new 
constructors are added.

As such, approach this very similar to `NativeExecutable` thunks are currently 
swapped, except with the underlying native functions instead.

* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::expectedFunctionForIdentifier):
Prevent the optimizations for `new Array` and `new Object` when Web Inspector 
is open.

* Source/JavaScriptCore/runtime/InternalFunction.cpp:
(JSC::InternalFunction::finishCreation):
* Source/JavaScriptCore/debugger/Debugger.h:
(JSC::Debugger::Observer::didCreateInternalFunction): Added.
(JSC::Debugger::Observer::willCallInternalFunction): Added.
* Source/JavaScriptCore/debugger/Debugger.cpp:
(JSC::Debugger::didCreateInternalFunction): Added.
(JSC::Debugger::willCallInternalFunction): Added.
Notify Web Inspector whenever a new `InternalFunction` is created so that any 
existing symbolic breakpoints can match it.

* Source/JavaScriptCore/runtime/InternalFunction.h:
(JSC::InternalFunction::setNativeFunctionForDebugger): Added.
* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h:
* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::functionName):
(Inspector::ReplacedInternalFunction::~ReplacedInternalFunction): Added.
(Inspector::ReplacedInternalFunction::operator==): Added.
(Inspector::replacedInternalFunctions): Added.
(Inspector::internalFunctionWithDebuggerHook): Added.
(Inspector::internalFunctionCallWithDebuggerHook): Added.
(Inspector::internalFunctionConstructWithDebuggerHook): Added.
(Inspector::InspectorDebuggerAgent::addSymbolicBreakpoint):
(Inspector::InspectorDebuggerAgent::removeSymbolicBreakpoint):
(Inspector::InspectorDebuggerAgent::didCreateInternalFunction): Added.
(Inspector::InspectorDebuggerAgent::willCallInternalFunction): Added.
(Inspector::InspectorDebuggerAgent::clearInspectorBreakpointState):
Allow swapping the underlying native function with a variant that includes a 
host call to the debugger.

* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-insensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-insensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-sensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-exact-case-sensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-insensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-insensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-sensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-exact-case-sensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-insensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-insensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-sensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-dom-regex-case-sensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-insensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-insensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-sensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-exact-case-sensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-insensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-insensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-sensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-native-js-regex-case-sensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-insensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-insensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-sensitive.html:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-construct-regex-case-sensitive-expected.txt:
 Copied from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive-expected.txt.
Add new Symbolic Breakpoint tests (based on existing tests) for constructing 
with a function.

* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-insensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-insensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-sensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-sensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-exact-case-sensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-exact-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-insensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-insensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-sensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-exact-case-sensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-sensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-insensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-insensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-sensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-dom-regex-case-sensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-sensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-insensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-insensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-sensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-exact-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-exact-case-sensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-insensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-insensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-regex-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-sensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-js-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-native-js-regex-case-sensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-native-dom-exact-case-insensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-insensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-insensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-insensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-sensitive-expected.txt.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-sensitive.html:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-sensitive.html.
* 
LayoutTests/inspector/debugger/symbolic-breakpoint-call-regex-case-sensitive-expected.txt:
 Renamed from 
LayoutTests/inspector/debugger/symbolic-breakpoint-regex-case-insensitive-expected.txt.
Rename existing Symbolic Breakpoint tests to clarify that they only test 
calling functions (as opposed to constructing with a function).

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



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

Reply via email to