| Index: Source/core/inspector/InspectorDebuggerAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| index 35a4996064fd02f3a4396933829c26049d825cc8..7318518c681870dccecfe70452f99790bfbb34e0 100644
|
| --- a/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| +++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| @@ -61,6 +61,11 @@ static const char pauseOnExceptionsState[] = "pauseOnExceptionsState";
|
|
|
| const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace";
|
|
|
| +static String generateBreakpointId(const String& scriptId, int lineNumber, int columnNumber)
|
| +{
|
| + return scriptId + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
|
| +}
|
| +
|
| InspectorDebuggerAgent::InspectorDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* inspectorState, InjectedScriptManager* injectedScriptManager)
|
| : InspectorBaseAgent<InspectorDebuggerAgent>("Debugger", instrumentingAgents, inspectorState)
|
| , m_injectedScriptManager(injectedScriptManager)
|
| @@ -260,7 +265,7 @@ void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const RefPt
|
|
|
| String condition = optionalCondition ? *optionalCondition : emptyString();
|
|
|
| - String breakpointId = scriptId + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
|
| + String breakpointId = generateBreakpointId(scriptId, lineNumber, columnNumber);
|
| if (m_breakpointIdToDebugServerBreakpointIds.find(breakpointId) != m_breakpointIdToDebugServerBreakpointIds.end()) {
|
| *errorString = "Breakpoint at specified location already exists.";
|
| return;
|
| @@ -768,6 +773,20 @@ void ScriptDebugListener::Script::reportMemoryUsage(MemoryObjectInfo* memoryObje
|
| info.addMember(sourceMappingURL, "sourceMappingURL");
|
| }
|
|
|
| +void InspectorDebuggerAgent::setBreakpoint(const String& scriptId, int lineNumber, int columnNumber)
|
| +{
|
| + String breakpointId = generateBreakpointId(scriptId, lineNumber, columnNumber);
|
| + ScriptBreakpoint breakpoint(lineNumber, columnNumber, emptyString());
|
| + resolveBreakpoint(breakpointId, scriptId, breakpoint);
|
| +}
|
| +
|
| +void InspectorDebuggerAgent::removeBreakpoint(const String& scriptId, int lineNumber, int columnNumber)
|
| +{
|
| + String breakpointId = generateBreakpointId(scriptId, lineNumber, columnNumber);
|
| + ErrorString errorString;
|
| + removeBreakpoint(&errorString, breakpointId);
|
| +}
|
| +
|
| void InspectorDebuggerAgent::reset()
|
| {
|
| m_scripts.clear();
|
|
|