Ignore:
Timestamp:
Apr 13, 2022, 2:01:19 PM (3 years ago)
Author:
[email protected]
Message:

[JSC] Remove DeprecatedCallFrameForDebugger
https://bugs.webkit.org/show_bug.cgi?id=239045

Reviewed by Devin Rousso.

We should not enlarge sizeof(JSGlobalObject) by having DeprecatedCallFrameForDebugger which is only used for Debugger, and it is used
only when we have an error when evaluating top-level SyntaxError. This patch removes it: we introduce EmptyTopLevelCallFrameForDebugger
which can be constructed on stack and we use it instead of DeprecatedCallFrameForDebugger.

  • Source/JavaScriptCore/debugger/Debugger.cpp:

(JSC::Debugger::updateCallFrame):
(JSC::EmptyTopLevelCallFrameForDebugger::EmptyTopLevelCallFrameForDebugger):
(JSC::EmptyTopLevelCallFrameForDebugger::asCallFrame):
(JSC::Debugger::exception):

  • Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::create):
(JSC::DebuggerCallFrame::positionForCallFrame):

  • Source/JavaScriptCore/interpreter/CallFrame.cpp:

(JSC::CallFrame::convertToStackOverflowFrame):
(JSC::CallFrame::initDeprecatedCallFrameForDebugger): Deleted.

  • Source/JavaScriptCore/interpreter/CallFrame.h:

(JSC::CallFrame::isEmptyTopLevelCallFrameForDebugger const):
(JSC::CallFrame::isDeprecatedCallFrameForDebugger const): Deleted.

  • Source/JavaScriptCore/interpreter/Interpreter.cpp:

(JSC::Interpreter::notifyDebuggerOfExceptionToBeThrown):

  • Source/JavaScriptCore/runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::deprecatedCallFrameForDebugger): Deleted.

  • Source/JavaScriptCore/runtime/JSGlobalObject.h:
  • Source/JavaScriptCore/runtime/VM.cpp:

(JSC::VM::throwException):

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r292795 r292830  
    899899
    900900    CallFrame* throwOriginFrame = topJSCallFrame();
    901     if (!throwOriginFrame)
    902         throwOriginFrame = globalObject->deprecatedCallFrameForDebugger();
    903 
    904901    if (UNLIKELY(Options::breakOnThrow())) {
    905902        CodeBlock* codeBlock = throwOriginFrame ? throwOriginFrame->codeBlock() : nullptr;
Note: See TracChangeset for help on using the changeset viewer.