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

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

Issue 2012753003: DevTools: consolidate protocol generators for front-end, backend and type builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/V8ProfilerAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
index d1d72b6aa9ae18e2ade7eb5745794a606faf0b87..92762f73dc8e9da278772c5bc10dc87017e8c464 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
@@ -121,11 +121,11 @@ public:
String16 m_title;
};
-V8ProfilerAgentImpl::V8ProfilerAgentImpl(V8InspectorSessionImpl* session, protocol::Profiler::Frontend* frontend, protocol::DictionaryValue* state)
+V8ProfilerAgentImpl::V8ProfilerAgentImpl(V8InspectorSessionImpl* session, protocol::FrontendChannel* frontendChannel, protocol::DictionaryValue* state)
: m_session(session)
, m_isolate(m_session->debugger()->isolate())
, m_state(state)
- , m_frontend(frontend)
+ , m_frontend(frontendChannel)
, m_enabled(false)
, m_recordingCPUProfile(false)
{
@@ -139,18 +139,16 @@ void V8ProfilerAgentImpl::consoleProfile(const String16& title)
{
if (!m_enabled)
return;
- DCHECK(m_frontend);
String16 id = nextProfileId();
m_startedProfiles.append(ProfileDescriptor(id, title));
startProfiling(id);
- m_frontend->consoleProfileStarted(id, currentDebugLocation(m_session->debugger()), title);
+ m_frontend.consoleProfileStarted(id, currentDebugLocation(m_session->debugger()), title);
}
void V8ProfilerAgentImpl::consoleProfileEnd(const String16& title)
{
if (!m_enabled)
return;
- DCHECK(m_frontend);
String16 id;
String16 resolvedTitle;
// Take last started profile if no title was passed.
@@ -176,7 +174,7 @@ void V8ProfilerAgentImpl::consoleProfileEnd(const String16& title)
if (!profile)
return;
std::unique_ptr<protocol::Debugger::Location> location = currentDebugLocation(m_session->debugger());
- m_frontend->consoleProfileFinished(id, std::move(location), std::move(profile), resolvedTitle);
+ m_frontend.consoleProfileFinished(id, std::move(location), std::move(profile), resolvedTitle);
}
void V8ProfilerAgentImpl::enable(ErrorString*)

Powered by Google App Engine
This is Rietveld 408576698