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

Unified Diff: Source/core/inspector/ScriptCallFrame.cpp

Issue 688623002: [Thread-safe] Remove TracedValue::setArray (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename to ScriptCallFrame::toTracedValue. Created 6 years, 1 month 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
« no previous file with comments | « Source/core/inspector/ScriptCallFrame.h ('k') | Source/core/inspector/ScriptCallStack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/ScriptCallFrame.cpp
diff --git a/Source/core/inspector/ScriptCallFrame.cpp b/Source/core/inspector/ScriptCallFrame.cpp
index ef69b23f06fc500f17a3b4139c117a4f13af6835..0cc277bf39bfb39408935e19887250678dd081fc 100644
--- a/Source/core/inspector/ScriptCallFrame.cpp
+++ b/Source/core/inspector/ScriptCallFrame.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "core/inspector/ScriptCallFrame.h"
+#include "platform/TracedValue.h"
+
namespace blink {
ScriptCallFrame::ScriptCallFrame()
@@ -55,6 +57,8 @@ ScriptCallFrame::~ScriptCallFrame()
{
}
+// buildInspectorObject() and toTracedValue() should set the same fields.
+// If either of them is modified, the other should be also modified.
PassRefPtr<TypeBuilder::Console::CallFrame> ScriptCallFrame::buildInspectorObject() const
{
return TypeBuilder::Console::CallFrame::create()
@@ -66,4 +70,15 @@ PassRefPtr<TypeBuilder::Console::CallFrame> ScriptCallFrame::buildInspectorObjec
.release();
}
+void ScriptCallFrame::toTracedValue(TracedValue* value) const
+{
+ value->beginDictionary();
+ value->setString("functionName", m_functionName);
+ value->setString("scriptId", m_scriptId);
+ value->setString("url", m_scriptName);
+ value->setInteger("lineNumber", m_lineNumber);
+ value->setInteger("columnNumber", m_column);
+ value->endDictionary();
+}
+
} // namespace blink
« no previous file with comments | « Source/core/inspector/ScriptCallFrame.h ('k') | Source/core/inspector/ScriptCallStack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698