diff options
-rw-r--r-- | chromium/v8/src/inspector/v8-debugger-agent-impl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chromium/v8/src/inspector/v8-debugger-agent-impl.cc b/chromium/v8/src/inspector/v8-debugger-agent-impl.cc index e4e6492b67a..6e53773215a 100644 --- a/chromium/v8/src/inspector/v8-debugger-agent-impl.cc +++ b/chromium/v8/src/inspector/v8-debugger-agent-impl.cc @@ -455,6 +455,8 @@ Response V8DebuggerAgentImpl::setBreakpointByUrl( Maybe<int> optionalColumnNumber, Maybe<String16> optionalCondition, String16* outBreakpointId, std::unique_ptr<protocol::Array<protocol::Debugger::Location>>* locations) { + if (!enabled()) return Response::Error(kDebuggerNotEnabled); + *locations = Array<protocol::Debugger::Location>::create(); int specified = (optionalURL.isJust() ? 1 : 0) + @@ -542,6 +544,8 @@ Response V8DebuggerAgentImpl::setBreakpoint( String16 breakpointId = generateBreakpointId( BreakpointType::kByScriptId, location->getScriptId(), location->getLineNumber(), location->getColumnNumber(0)); + if (!enabled()) return Response::Error(kDebuggerNotEnabled); + if (m_breakpointIdToDebuggerBreakpointIds.find(breakpointId) != m_breakpointIdToDebuggerBreakpointIds.end()) { return Response::Error("Breakpoint at specified location already exists."); @@ -558,6 +562,8 @@ Response V8DebuggerAgentImpl::setBreakpoint( Response V8DebuggerAgentImpl::setBreakpointOnFunctionCall( const String16& functionObjectId, Maybe<String16> optionalCondition, String16* outBreakpointId) { + if (!enabled()) return Response::Error(kDebuggerNotEnabled); + InjectedScript::ObjectScope scope(m_session, functionObjectId); Response response = scope.initialize(); if (!response.isSuccess()) return response; |