Ignore:
Timestamp:
Feb 5, 2020, 6:19:10 PM (6 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Sources: add a special breakpoint for controlling whether debugger statements pause
https://bugs.webkit.org/show_bug.cgi?id=206818

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/Debugger.json:
  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::setPauseOnDebuggerStatements): Added.

  • bytecompiler/NodesCodegen.cpp:

(JSC::DebuggerStatementNode::emitBytecode):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::dumpLineColumnEntry):

  • interpreter/Interpreter.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::debug):
(WTF::printInternal):

  • debugger/Debugger.h:

(JSC::Debugger::setPauseOnDebuggerStatements): Added.

  • debugger/Debugger.cpp:

(JSC::Debugger::didReachDebuggerStatement): Added.
(JSC::Debugger::didReachBreakpoint): Deleted.
Replace DebugHookType::DidReachBreakpoint with DebugHookType::DidReachDebuggerStatement,
as it is only actually used for debugger; statements, not breakpoints.

Source/WebInspectorUI:

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager):
(WI.DebuggerManager.prototype.async initializeTarget):
(WI.DebuggerManager.prototype.get debuggerStatementsBreakpoint): Added.
(WI.DebuggerManager.prototype.isBreakpointRemovable):
(WI.DebuggerManager.prototype._breakpointDisabledStateDidChange):

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
(WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):

  • UserInterface/Views/BreakpointTreeElement.css:

(.breakpoint-debugger-statement-icon .icon): Added.

  • UserInterface/Images/DebuggerStatement.svg: Added.
  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/debugger/setPauseOnDebuggerStatements.html: Added.
  • inspector/debugger/setPauseOnDebuggerStatements-expected.txt: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r255687 r255887  
    759759
    760760        case op_debug: {
    761             if (instruction->as<OpDebug>().m_debugHookType == DidReachBreakpoint)
     761            if (instruction->as<OpDebug>().m_debugHookType == DidReachDebuggerStatement)
    762762                m_hasDebuggerStatement = true;
    763763            break;
Note: See TracChangeset for help on using the changeset viewer.