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

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

Issue 473923002: DevTools: Prevent a debugger pause while executing js code in releaseObjectGroup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address aandrey's comment Created 6 years, 4 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/ScriptDebugServer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorRuntimeAgent.cpp
diff --git a/Source/core/inspector/InspectorRuntimeAgent.cpp b/Source/core/inspector/InspectorRuntimeAgent.cpp
index eb3bdca51e988e5f6fe010e0796467fb0d186217..7dadc08cabbc5fe698a0a3dd72aaf3f91a731d3c 100644
--- a/Source/core/inspector/InspectorRuntimeAgent.cpp
+++ b/Source/core/inspector/InspectorRuntimeAgent.cpp
@@ -141,13 +141,24 @@ void InspectorRuntimeAgent::getProperties(ErrorString* errorString, const String
void InspectorRuntimeAgent::releaseObject(ErrorString*, const String& objectId)
{
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
- if (!injectedScript.isEmpty())
- injectedScript.releaseObject(objectId);
+ if (injectedScript.isEmpty())
+ return;
+ bool pausingOnNextStatement = m_scriptDebugServer->pausingOnNextStatement();
+ if (pausingOnNextStatement)
+ m_scriptDebugServer->setPauseOnNextStatement(false);
+ injectedScript.releaseObject(objectId);
+ if (pausingOnNextStatement)
+ m_scriptDebugServer->setPauseOnNextStatement(true);
}
void InspectorRuntimeAgent::releaseObjectGroup(ErrorString*, const String& objectGroup)
{
+ bool pausingOnNextStatement = m_scriptDebugServer->pausingOnNextStatement();
+ if (pausingOnNextStatement)
+ m_scriptDebugServer->setPauseOnNextStatement(false);
m_injectedScriptManager->releaseObjectGroup(objectGroup);
+ if (pausingOnNextStatement)
+ m_scriptDebugServer->setPauseOnNextStatement(true);
}
void InspectorRuntimeAgent::run(ErrorString*)
« no previous file with comments | « Source/bindings/core/v8/ScriptDebugServer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698