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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp

Issue 1907663005: [DevTools] Move v8-related instrumentation from agents to InspectorSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1889533002
Patch Set: profiler agent restore starts instrumenting Created 4 years, 8 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: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
index fe244fa8d89aed97d38aa16bce83164354815d2e..03d016f4f42daa2e6a79f7eea38a2b783367a7e3 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -365,6 +365,9 @@ void V8RuntimeAgentImpl::restore()
void V8RuntimeAgentImpl::enable(ErrorString* errorString)
{
+ if (m_enabled)
+ return;
+ m_session->changeInstrumentationCounter(+1);
m_enabled = true;
v8::HandleScope handles(m_debugger->isolate());
m_session->reportAllContexts(this);
@@ -377,6 +380,7 @@ void V8RuntimeAgentImpl::disable(ErrorString* errorString)
m_enabled = false;
m_session->discardInjectedScripts();
reset();
+ m_session->changeInstrumentationCounter(-1);
}
void V8RuntimeAgentImpl::setClearConsoleCallback(PassOwnPtr<V8RuntimeAgent::ClearConsoleCallback> callback)

Powered by Google App Engine
This is Rietveld 408576698