diff --git a/chromium/v8/src/inspector/v8-debugger-agent-impl.cc b/chromium/v8/src/inspector/v8-debugger-agent-impl.cc index 399fa4c40934..bd948cd8ac1c 100644 --- a/chromium/v8/src/inspector/v8-debugger-agent-impl.cc +++ b/chromium/v8/src/inspector/v8-debugger-agent-impl.cc @@ -499,6 +499,8 @@ Response V8DebuggerAgentImpl::setBreakpointByUrl( Maybe optionalColumnNumber, Maybe optionalCondition, String16* outBreakpointId, std::unique_ptr>* locations) { + if (!enabled()) return Response::ServerError(kDebuggerNotEnabled); + *locations = std::make_unique>(); int specified = (optionalURL.isJust() ? 1 : 0) + @@ -587,6 +589,8 @@ Response V8DebuggerAgentImpl::setBreakpoint( String16 breakpointId = generateBreakpointId( BreakpointType::kByScriptId, location->getScriptId(), location->getLineNumber(), location->getColumnNumber(0)); + if (!enabled()) return Response::ServerError(kDebuggerNotEnabled); + if (m_breakpointIdToDebuggerBreakpointIds.find(breakpointId) != m_breakpointIdToDebuggerBreakpointIds.end()) { return Response::ServerError( @@ -605,6 +609,8 @@ Response V8DebuggerAgentImpl::setBreakpoint( Response V8DebuggerAgentImpl::setBreakpointOnFunctionCall( const String16& functionObjectId, Maybe optionalCondition, String16* outBreakpointId) { + if (!enabled()) return Response::ServerError(kDebuggerNotEnabled); + InjectedScript::ObjectScope scope(m_session, functionObjectId); Response response = scope.initialize(); if (!response.IsSuccess()) return response;