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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/SourceLocation.h" 5 #include "bindings/core/v8/SourceLocation.h"
6 6
7 #include "bindings/core/v8/V8PerIsolateData.h" 7 #include "bindings/core/v8/V8PerIsolateData.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/ExecutionContext.h" 9 #include "core/dom/ExecutionContext.h"
10 #include "core/dom/ScriptableDocumentParser.h" 10 #include "core/dom/ScriptableDocumentParser.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 , m_columnNumber(columnNumber) 77 , m_columnNumber(columnNumber)
78 , m_stackTrace(std::move(stackTrace)) 78 , m_stackTrace(std::move(stackTrace))
79 , m_scriptId(scriptId) 79 , m_scriptId(scriptId)
80 { 80 {
81 } 81 }
82 82
83 SourceLocation::~SourceLocation() 83 SourceLocation::~SourceLocation()
84 { 84 {
85 } 85 }
86 86
87 void SourceLocation::toTracedValue(TracedValue* value, const char* name) const
88 {
89 if (!m_stackTrace || m_stackTrace->isEmpty())
90 return;
91 value->beginArray(name);
92 value->beginDictionary();
93 value->setString("functionName", m_stackTrace->topFunctionName());
94 value->setString("scriptId", m_stackTrace->topScriptId());
95 value->setString("url", m_stackTrace->topSourceURL());
96 value->setInteger("lineNumber", m_stackTrace->topLineNumber());
97 value->setInteger("columnNumber", m_stackTrace->topColumnNumber());
98 value->endDictionary();
99 value->endArray();
100 }
101
87 } // namespace blink 102 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698