Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1175)

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 1129473003: DevTools: respond with error when Debugger command is sent to disabled debugger agent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index eaead68db7c6ff416a0fc0405b97d84c8e6a756e..82becf4f634e091fc098f1898f08f964203f6b85 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -180,6 +180,14 @@ void InspectorDebuggerAgent::init()
m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServer::DontPauseOnExceptions);
}
+bool InspectorDebuggerAgent::checkEnabled(ErrorString* errorString)
+{
+ if (enabled())
+ return true;
+ *errorString = "Debugger agent is not enabled";
+ return false;
+}
+
void InspectorDebuggerAgent::enable()
{
m_instrumentingAgents->setInspectorDebuggerAgent(this);
« Source/bindings/core/v8/ScriptDebugServer.h ('K') | « Source/core/inspector/InspectorDebuggerAgent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698