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

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

Issue 1132793002: DevTools: do not enable debugger for pages where script execution is prohibited (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/PageDebuggerAgent.cpp
diff --git a/Source/core/inspector/PageDebuggerAgent.cpp b/Source/core/inspector/PageDebuggerAgent.cpp
index f0adbadeb2bb12da4df928bea1dd823eb514652c..5b0fdb0e227553c0b96af56688e45f12bfdf6672 100644
--- a/Source/core/inspector/PageDebuggerAgent.cpp
+++ b/Source/core/inspector/PageDebuggerAgent.cpp
@@ -72,10 +72,12 @@ DEFINE_TRACE(PageDebuggerAgent)
InspectorDebuggerAgent::trace(visitor);
}
-void PageDebuggerAgent::enable()
+bool PageDebuggerAgent::enable()
{
- InspectorDebuggerAgent::enable();
- m_instrumentingAgents->setPageDebuggerAgent(this);
+ bool result = InspectorDebuggerAgent::enable();
+ if (result)
+ m_instrumentingAgents->setPageDebuggerAgent(this);
+ return result;
}
void PageDebuggerAgent::disable()
@@ -84,9 +86,9 @@ void PageDebuggerAgent::disable()
m_instrumentingAgents->setPageDebuggerAgent(0);
}
-void PageDebuggerAgent::startListeningScriptDebugServer()
+bool PageDebuggerAgent::startListeningScriptDebugServer()
{
- scriptDebugServer().addListener(this, m_pageAgent->inspectedFrame(), m_debuggerId);
+ return scriptDebugServer().addListener(this, m_pageAgent->inspectedFrame(), m_debuggerId);
}
void PageDebuggerAgent::stopListeningScriptDebugServer()

Powered by Google App Engine
This is Rietveld 408576698