| Index: Source/core/inspector/InspectorDebuggerAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| index adf92f72854e066d2fe36f075bcc67cafcfb982e..545d597f764e3bd83c3a3e447599db9d3abba3b3 100644
|
| --- a/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| +++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| @@ -188,17 +188,20 @@ bool InspectorDebuggerAgent::checkEnabled(ErrorString* errorString)
|
| return false;
|
| }
|
|
|
| -void InspectorDebuggerAgent::enable()
|
| +bool InspectorDebuggerAgent::enable()
|
| {
|
| + if (!startListeningScriptDebugServer())
|
| + return false;
|
| +
|
| m_instrumentingAgents->setInspectorDebuggerAgent(this);
|
|
|
| - startListeningScriptDebugServer();
|
| // FIXME(WK44513): breakpoints activated flag should be synchronized between all front-ends
|
| scriptDebugServer().setBreakpointsActivated(true);
|
|
|
| m_state->setBoolean(DebuggerAgentState::debuggerEnabled, true);
|
| if (m_listener)
|
| m_listener->debuggerWasEnabled();
|
| + return true;
|
| }
|
|
|
| void InspectorDebuggerAgent::disable()
|
| @@ -225,12 +228,15 @@ bool InspectorDebuggerAgent::enabled()
|
| return m_state->getBoolean(DebuggerAgentState::debuggerEnabled);
|
| }
|
|
|
| -void InspectorDebuggerAgent::enable(ErrorString*)
|
| +void InspectorDebuggerAgent::enable(ErrorString* errorString)
|
| {
|
| if (enabled())
|
| return;
|
|
|
| - enable();
|
| + if (!enable()) {
|
| + *errorString = "Failed to enable debugger";
|
| + return;
|
| + }
|
|
|
| ASSERT(frontend());
|
| }
|
|
|