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

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

Issue 1913283003: [DevTools] Rework idle{Started,Finished} instrumentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1907663005
Patch Set: rebased 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/V8DebuggerImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
index 2b94263b4be3e4a8b992a1c1fc6f544f725aebfb..2be6bf8f49ea9a9e6ea32c19950a394bca3ab932 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
@@ -42,6 +42,7 @@
#include "platform/v8_inspector/V8StackTraceImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
#include "platform/v8_inspector/public/V8DebuggerClient.h"
+#include <v8-profiler.h>
namespace blink {
@@ -809,6 +810,16 @@ void V8DebuggerImpl::didExecuteScript(v8::Local<v8::Context> context)
agent->didExecuteScript();
}
+void V8DebuggerImpl::idleStarted()
+{
+ m_isolate->GetCpuProfiler()->SetIdle(true);
+}
+
+void V8DebuggerImpl::idleFinished()
+{
+ m_isolate->GetCpuProfiler()->SetIdle(false);
+}
+
PassOwnPtr<V8StackTrace> V8DebuggerImpl::captureStackTrace(size_t maxStackSize)
{
V8DebuggerAgentImpl* agent = findEnabledDebuggerAgent(m_isolate->GetCurrentContext());

Powered by Google App Engine
This is Rietveld 408576698