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

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

Issue 2087953004: Switch v8 inspector to stl collections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually remove a value from the list Created 4 years, 6 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/V8StackTraceImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
index 650c71eb957f20fae005cf51d58204596669c13f..8e3472b0da2cca559452a62b6210e3816ef3bfe0 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
@@ -36,7 +36,7 @@ V8StackTraceImpl::Frame toFrame(v8::Local<v8::StackFrame> frame)
return V8StackTraceImpl::Frame(functionName, scriptId, sourceName, sourceLineNumber, sourceColumn);
}
-void toFramesVector(v8::Local<v8::StackTrace> stackTrace, protocol::Vector<V8StackTraceImpl::Frame>& frames, size_t maxStackSize, v8::Isolate* isolate)
+void toFramesVector(v8::Local<v8::StackTrace> stackTrace, std::vector<V8StackTraceImpl::Frame>& frames, size_t maxStackSize, v8::Isolate* isolate)
{
DCHECK(isolate->InContext());
int frameCount = stackTrace->GetFrameCount();
@@ -44,7 +44,7 @@ void toFramesVector(v8::Local<v8::StackTrace> stackTrace, protocol::Vector<V8Sta
frameCount = maxStackSize;
for (int i = 0; i < frameCount; i++) {
v8::Local<v8::StackFrame> stackFrame = stackTrace->GetFrame(i);
- frames.append(toFrame(stackFrame));
+ frames.push_back(toFrame(stackFrame));
}
}
@@ -94,7 +94,7 @@ std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::create(V8DebuggerAgentImpl*
{
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
- protocol::Vector<V8StackTraceImpl::Frame> frames;
+ std::vector<V8StackTraceImpl::Frame> frames;
if (!stackTrace.IsEmpty())
toFramesVector(stackTrace, frames, maxStackSize, isolate);
@@ -147,7 +147,7 @@ std::unique_ptr<V8StackTrace> V8StackTraceImpl::clone()
std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::cloneImpl()
{
- protocol::Vector<Frame> framesCopy(m_frames);
+ std::vector<Frame> framesCopy(m_frames);
return wrapUnique(new V8StackTraceImpl(m_description, framesCopy, m_parent ? m_parent->cloneImpl() : nullptr));
}
@@ -158,13 +158,13 @@ std::unique_ptr<V8StackTrace> V8StackTraceImpl::isolatedCopy()
std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::isolatedCopyImpl()
{
- protocol::Vector<Frame> frames;
+ std::vector<Frame> frames;
for (size_t i = 0; i < m_frames.size(); i++)
- frames.append(m_frames.at(i).isolatedCopy());
+ frames.push_back(m_frames.at(i).isolatedCopy());
return wrapUnique(new V8StackTraceImpl(m_description.isolatedCopy(), frames, m_parent ? m_parent->isolatedCopyImpl() : nullptr));
}
-V8StackTraceImpl::V8StackTraceImpl(const String16& description, protocol::Vector<Frame>& frames, std::unique_ptr<V8StackTraceImpl> parent)
+V8StackTraceImpl::V8StackTraceImpl(const String16& description, std::vector<Frame>& frames, std::unique_ptr<V8StackTraceImpl> parent)
: m_description(description)
, m_parent(std::move(parent))
{

Powered by Google App Engine
This is Rietveld 408576698