Chromium Code Reviews| 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) |