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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp

Issue 2010603002: Use SourceLocation when reporting runtime exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2004243002
Patch Set: test fixes 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 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 "platform/v8_inspector/V8StackTraceImpl.h" 5 #include "platform/v8_inspector/V8StackTraceImpl.h"
6 6
7 #include "platform/inspector_protocol/String16.h" 7 #include "platform/inspector_protocol/String16.h"
8 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" 8 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
9 #include "platform/v8_inspector/V8DebuggerImpl.h" 9 #include "platform/v8_inspector/V8DebuggerImpl.h"
10 #include "platform/v8_inspector/V8StringUtil.h" 10 #include "platform/v8_inspector/V8StringUtil.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 , m_scriptName(scriptName) 65 , m_scriptName(scriptName)
66 , m_lineNumber(lineNumber) 66 , m_lineNumber(lineNumber)
67 , m_columnNumber(column) 67 , m_columnNumber(column)
68 { 68 {
69 } 69 }
70 70
71 V8StackTraceImpl::Frame::~Frame() 71 V8StackTraceImpl::Frame::~Frame()
72 { 72 {
73 } 73 }
74 74
75 // buildInspectorObject() and ScriptCallStack's toTracedValue() should set the s ame fields. 75 // buildInspectorObject() and SourceLocation's toTracedValue() should set the sa me fields.
76 // If either of them is modified, the other should be also modified. 76 // If either of them is modified, the other should be also modified.
77 std::unique_ptr<protocol::Runtime::CallFrame> V8StackTraceImpl::Frame::buildInsp ectorObject() const 77 std::unique_ptr<protocol::Runtime::CallFrame> V8StackTraceImpl::Frame::buildInsp ectorObject() const
78 { 78 {
79 return protocol::Runtime::CallFrame::create() 79 return protocol::Runtime::CallFrame::create()
80 .setFunctionName(m_functionName) 80 .setFunctionName(m_functionName)
81 .setScriptId(m_scriptId) 81 .setScriptId(m_scriptId)
82 .setUrl(m_scriptName) 82 .setUrl(m_scriptName)
83 .setLineNumber(m_lineNumber) 83 .setLineNumber(m_lineNumber)
84 .setColumnNumber(m_columnNumber) 84 .setColumnNumber(m_columnNumber)
85 .build(); 85 .build();
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 stackTrace.append(':'); 223 stackTrace.append(':');
224 stackTrace.appendNumber(frame.lineNumber()); 224 stackTrace.appendNumber(frame.lineNumber());
225 stackTrace.append(':'); 225 stackTrace.append(':');
226 stackTrace.appendNumber(frame.columnNumber()); 226 stackTrace.appendNumber(frame.columnNumber());
227 stackTrace.append(')'); 227 stackTrace.append(')');
228 } 228 }
229 return stackTrace.toString(); 229 return stackTrace.toString();
230 } 230 }
231 231
232 } // namespace blink 232 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698