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

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

Issue 1997293002: Introduce SourceLocation to be used for console messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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/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 d7a3937c8e64b26d2682c49e23789224516de826..c9bc6ce693965f95f10bdf9922540a3e1ecd8b79 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
@@ -107,7 +107,7 @@ PassOwnPtr<V8StackTraceImpl> V8StackTraceImpl::create(V8DebuggerAgentImpl* agent
if (stackTrace.IsEmpty() && !asyncCallChain)
return nullptr;
- OwnPtr<V8StackTraceImpl> result = adoptPtr(new V8StackTraceImpl(description, frames, asyncCallChain ? asyncCallChain->clone() : nullptr));
+ OwnPtr<V8StackTraceImpl> result = adoptPtr(new V8StackTraceImpl(description, frames, asyncCallChain ? asyncCallChain->cloneImpl() : nullptr));
// Crop to not exceed maxAsyncCallChainDepth.
V8StackTraceImpl* deepest = result.get();
@@ -135,10 +135,16 @@ PassOwnPtr<V8StackTraceImpl> V8StackTraceImpl::capture(V8DebuggerAgentImpl* agen
return V8StackTraceImpl::create(agent, stackTrace, maxStackSize, description);
}
-PassOwnPtr<V8StackTraceImpl> V8StackTraceImpl::clone()
+PassOwnPtr<V8StackTrace> V8StackTraceImpl::clone()
+{
+ OwnPtr<V8StackTraceImpl> copy = cloneImpl();
+ return adoptPtr(static_cast<V8StackTrace*>(copy.leakPtr()));
+}
+
+PassOwnPtr<V8StackTraceImpl> V8StackTraceImpl::cloneImpl()
{
protocol::Vector<Frame> framesCopy(m_frames);
- return adoptPtr(new V8StackTraceImpl(m_description, framesCopy, m_parent ? m_parent->clone() : nullptr));
+ return adoptPtr(new V8StackTraceImpl(m_description, framesCopy, m_parent ? m_parent->cloneImpl() : nullptr));
}
V8StackTraceImpl::V8StackTraceImpl(const String16& description, protocol::Vector<Frame>& frames, PassOwnPtr<V8StackTraceImpl> parent)

Powered by Google App Engine
This is Rietveld 408576698