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

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

Issue 2001333003: Switch some clients of ScriptCallStack to SourceLocation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1997293002
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/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 048e5ca1ca9b7d30491f49e04527d680a8f353da..6a03e9e218f54ef407c4923065f588b23958f13e 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SourceLocation.cpp
@@ -84,4 +84,19 @@ SourceLocation::~SourceLocation()
{
}
+void SourceLocation::toTracedValue(TracedValue* value, const char* name) const
+{
+ if (!m_stackTrace || m_stackTrace->isEmpty())
+ return;
+ value->beginArray(name);
+ value->beginDictionary();
+ value->setString("functionName", m_stackTrace->topFunctionName());
+ value->setString("scriptId", m_stackTrace->topScriptId());
+ value->setString("url", m_stackTrace->topSourceURL());
+ value->setInteger("lineNumber", m_stackTrace->topLineNumber());
+ value->setInteger("columnNumber", m_stackTrace->topColumnNumber());
+ value->endDictionary();
+ value->endArray();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698