-
joepeck@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=120576 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/setBreakpoint-actions.html inspector-protocol/debugger/setBreakpoint-options-exception.html * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpointAction::ScriptBreakpointAction): (WebCore::ScriptBreakpoint::ScriptBreakpoint): Struct for a breakpoint action. Type and string of data. * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::evaluateBreakpointAction): (WebCore::ScriptDebugServer::evaluateBreakpointActions): (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded): (WebCore::ScriptDebugServer::pauseIfNeeded): When a breakpoint is triggered evaluate each of its breakpoint actions in order. If there are exceptions, log them. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::didParseSource): Save and restore breakpoint actions where needed. (WebCore::breakpointActionTypeForString): (WebCore::breakpointActionsFromProtocol): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): Parse optional breakpoint actions from the protocol into ScriptBreakpointAction objects. LayoutTests: * inspector-protocol/debugger/resources/breakpoint.js: * inspector-protocol/debugger/setBreakpoint-actions-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-actions.html: Added. * inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-options-exception.html: Added. * inspector-protocol/resources/console-helper.js: Added. (ConsoleHelper.simplifiedConsoleMessage): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3178be9c