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

Unified Diff: src/inspector/V8InspectorImpl.cpp

Issue 2332243002: [inspector] fixed all deprecated calls (Closed)
Patch Set: addressed comments Created 4 years, 3 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 | « src/inspector/V8InspectorImpl.h ('k') | src/inspector/V8ProfilerAgentImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/V8InspectorImpl.cpp
diff --git a/src/inspector/V8InspectorImpl.cpp b/src/inspector/V8InspectorImpl.cpp
index c501302140ee4ca21b3fbe42bcfc92daaeb8e2ab..f631473fad4d83a34482d6f6d00335bfeff2e4dd 100644
--- a/src/inspector/V8InspectorImpl.cpp
+++ b/src/inspector/V8InspectorImpl.cpp
@@ -37,12 +37,11 @@
#include "src/inspector/V8Debugger.h"
#include "src/inspector/V8DebuggerAgentImpl.h"
#include "src/inspector/V8InspectorSessionImpl.h"
+#include "src/inspector/V8ProfilerAgentImpl.h"
#include "src/inspector/V8RuntimeAgentImpl.h"
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/protocol/Protocol.h"
-#include "include/v8-profiler.h"
-
namespace v8_inspector {
std::unique_ptr<V8Inspector> V8Inspector::create(v8::Isolate* isolate,
@@ -74,6 +73,13 @@ V8RuntimeAgentImpl* V8InspectorImpl::enabledRuntimeAgentForGroup(
return agent && agent->enabled() ? agent : nullptr;
}
+V8ProfilerAgentImpl* V8InspectorImpl::enabledProfilerAgentForGroup(
+ int contextGroupId) {
+ V8InspectorSessionImpl* session = sessionForContextGroup(contextGroupId);
+ V8ProfilerAgentImpl* agent = session ? session->profilerAgent() : nullptr;
+ return agent && agent->enabled() ? agent : nullptr;
+}
+
v8::MaybeLocal<v8::Value> V8InspectorImpl::runCompiledScript(
v8::Local<v8::Context> context, v8::Local<v8::Script> script) {
v8::MicrotasksScope microtasksScope(m_isolate,
@@ -271,11 +277,15 @@ void V8InspectorImpl::didExecuteScript(v8::Local<v8::Context> context) {
}
void V8InspectorImpl::idleStarted() {
- m_isolate->GetCpuProfiler()->SetIdle(true);
+ for (auto it = m_sessions.begin(); it != m_sessions.end(); ++it) {
+ if (it->second->profilerAgent()->idleStarted()) return;
+ }
}
void V8InspectorImpl::idleFinished() {
- m_isolate->GetCpuProfiler()->SetIdle(false);
+ for (auto it = m_sessions.begin(); it != m_sessions.end(); ++it) {
+ if (it->second->profilerAgent()->idleFinished()) return;
+ }
}
unsigned V8InspectorImpl::exceptionThrown(
« no previous file with comments | « src/inspector/V8InspectorImpl.h ('k') | src/inspector/V8ProfilerAgentImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698