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

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

Issue 1758313002: DevTools: introduce collections shim to be backed by non-wtf in v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 4 years, 10 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 76646efaf0416ad818fe772b0a3b1f5cd9344699..096ad2b90beb185469abae291355fe2099c21c42 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8ProfilerAgentImpl.cpp
@@ -26,7 +26,7 @@ PassOwnPtr<protocol::Array<protocol::Profiler::PositionTickInfo>> buildInspector
if (!lineCount)
return array.release();
- Vector<v8::CpuProfileNode::LineTick> entries(lineCount);
+ protocol::Vector<v8::CpuProfileNode::LineTick> entries(lineCount);
if (node->GetLineTicks(&entries[0], lineCount)) {
for (unsigned i = 0; i < lineCount; i++) {
OwnPtr<protocol::Profiler::PositionTickInfo> line = protocol::Profiler::PositionTickInfo::create()
@@ -185,8 +185,8 @@ void V8ProfilerAgentImpl::enable(ErrorString*)
void V8ProfilerAgentImpl::disable(ErrorString* errorString)
{
- for (Vector<ProfileDescriptor>::reverse_iterator it = m_startedProfiles.rbegin(); it != m_startedProfiles.rend(); ++it)
- stopProfiling(it->m_id, false);
+ for (size_t i = m_startedProfiles.size(); i > 0; --i)
+ stopProfiling(m_startedProfiles[i - 1].m_id, false);
m_startedProfiles.clear();
stop(nullptr, nullptr);
m_enabled = false;

Powered by Google App Engine
This is Rietveld 408576698