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

Unified Diff: Source/bindings/core/v8/PageScriptDebugServer.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
« no previous file with comments | « Source/bindings/core/v8/PageScriptDebugServer.h ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/PageScriptDebugServer.cpp
diff --git a/Source/bindings/core/v8/PageScriptDebugServer.cpp b/Source/bindings/core/v8/PageScriptDebugServer.cpp
index 0e7921a1340313968e5b5a8b71e8bc80da0c1ee1..0f808dcfe250ecbcf1a8a899770c927009489bcc 100644
--- a/Source/bindings/core/v8/PageScriptDebugServer.cpp
+++ b/Source/bindings/core/v8/PageScriptDebugServer.cpp
@@ -100,19 +100,20 @@ void PageScriptDebugServer::setContextDebugData(v8::Local<v8::Context> context,
ScriptDebugServer::setContextDebugData(context, debugData);
}
-void PageScriptDebugServer::addListener(ScriptDebugListener* listener, LocalFrame* localFrameRoot, int contextDebugId)
+bool PageScriptDebugServer::addListener(ScriptDebugListener* listener, LocalFrame* localFrameRoot, int contextDebugId)
{
ASSERT(localFrameRoot == localFrameRoot->localFrameRoot());
ScriptController& scriptController = localFrameRoot->script();
if (!scriptController.canExecuteScripts(NotAboutToExecuteScript))
sergeyv 2015/05/08 13:11:42 Lets make this check earlier - in the enable metho
yurys 2015/05/08 13:21:14 Done.
- return;
+ return false;
if (m_listenersMap.isEmpty())
enable();
m_listenersMap.set(localFrameRoot, listener);
String contextDataSubstring = "," + String::number(contextDebugId) + "]";
reportCompiledScripts(contextDataSubstring, listener);
+ return true;
}
void PageScriptDebugServer::removeListener(ScriptDebugListener* listener, LocalFrame* localFrame)
« no previous file with comments | « Source/bindings/core/v8/PageScriptDebugServer.h ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698