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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved api a bit 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/bindings/core/v8/SourceLocation.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
index 61a7f42c605fc0b86e8019ff2cbc3cb49bd59b42..ca95165fd8186c8902732b2fc1ada078434e7898 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
@@ -28,13 +28,8 @@ std::unique_ptr<V8StackTrace> captureStackTrace(bool full)
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
if (!data->threadDebugger() || !isolate->InContext())
return nullptr;
- size_t stackSize = full ? V8StackTrace::maxCallStackSizeToCapture : 1;
- if (InspectorInstrumentation::hasFrontends()) {
- if (InspectorInstrumentation::consoleAgentEnabled(currentExecutionContext(isolate)))
- stackSize = V8StackTrace::maxCallStackSizeToCapture;
- }
ScriptForbiddenScope::AllowUserAgentScript allowScripting;
- return data->threadDebugger()->debugger()->captureStackTrace(stackSize);
+ return data->threadDebugger()->debugger()->captureStackTrace(full);
}
}
@@ -160,6 +155,11 @@ void SourceLocation::toTracedValue(TracedValue* value, const char* name) const
value->endArray();
}
+std::unique_ptr<V8StackTrace> SourceLocation::cloneStackTrace() const
+{
+ return m_stackTrace ? m_stackTrace->clone() : nullptr;
+}
+
std::unique_ptr<SourceLocation> SourceLocation::clone() const
{
return wrapUnique(new SourceLocation(m_url, m_lineNumber, m_columnNumber, m_stackTrace ? m_stackTrace->clone() : nullptr, m_scriptId));

Powered by Google App Engine
This is Rietveld 408576698