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

Side by Side Diff: src/inspector/v8-stack-trace-impl.cc

Issue 2523743003: Roll third_party/inspector_protocol to 73028acaa3646789fd2a3bfd0d79eb2d91b696b3 (Closed)
Patch Set: addressed comments Created 4 years 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
« no previous file with comments | « src/inspector/v8-runtime-agent-impl.cc ('k') | third_party/inspector_protocol/CodeGenerator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 "src/inspector/v8-stack-trace-impl.h" 5 #include "src/inspector/v8-stack-trace-impl.h"
6 6
7 #include "src/inspector/string-util.h" 7 #include "src/inspector/string-util.h"
8 #include "src/inspector/v8-debugger-agent-impl.h" 8 #include "src/inspector/v8-debugger-agent-impl.h"
9 #include "src/inspector/v8-debugger.h" 9 #include "src/inspector/v8-debugger.h"
10 #include "src/inspector/v8-inspector-impl.h" 10 #include "src/inspector/v8-inspector-impl.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (isolate->InContext()) { 173 if (isolate->InContext()) {
174 stackTrace = v8::StackTrace::CurrentStackTrace( 174 stackTrace = v8::StackTrace::CurrentStackTrace(
175 isolate, static_cast<int>(maxStackSize), stackTraceOptions); 175 isolate, static_cast<int>(maxStackSize), stackTraceOptions);
176 } 176 }
177 return V8StackTraceImpl::create(debugger, contextGroupId, stackTrace, 177 return V8StackTraceImpl::create(debugger, contextGroupId, stackTrace,
178 maxStackSize, description); 178 maxStackSize, description);
179 } 179 }
180 180
181 std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::cloneImpl() { 181 std::unique_ptr<V8StackTraceImpl> V8StackTraceImpl::cloneImpl() {
182 std::vector<Frame> framesCopy(m_frames); 182 std::vector<Frame> framesCopy(m_frames);
183 return wrapUnique( 183 return std::unique_ptr<V8StackTraceImpl>(
184 new V8StackTraceImpl(m_contextGroupId, m_description, framesCopy, 184 new V8StackTraceImpl(m_contextGroupId, m_description, framesCopy,
185 m_parent ? m_parent->cloneImpl() : nullptr)); 185 m_parent ? m_parent->cloneImpl() : nullptr));
186 } 186 }
187 187
188 std::unique_ptr<V8StackTrace> V8StackTraceImpl::clone() { 188 std::unique_ptr<V8StackTrace> V8StackTraceImpl::clone() {
189 std::vector<Frame> frames; 189 std::vector<Frame> frames;
190 for (size_t i = 0; i < m_frames.size(); i++) 190 for (size_t i = 0; i < m_frames.size(); i++)
191 frames.push_back(m_frames.at(i).clone()); 191 frames.push_back(m_frames.at(i).clone());
192 return wrapUnique( 192 return std::unique_ptr<V8StackTraceImpl>(
193 new V8StackTraceImpl(m_contextGroupId, m_description, frames, nullptr)); 193 new V8StackTraceImpl(m_contextGroupId, m_description, frames, nullptr));
194 } 194 }
195 195
196 V8StackTraceImpl::V8StackTraceImpl(int contextGroupId, 196 V8StackTraceImpl::V8StackTraceImpl(int contextGroupId,
197 const String16& description, 197 const String16& description,
198 std::vector<Frame>& frames, 198 std::vector<Frame>& frames,
199 std::unique_ptr<V8StackTraceImpl> parent) 199 std::unique_ptr<V8StackTraceImpl> parent)
200 : m_contextGroupId(contextGroupId), 200 : m_contextGroupId(contextGroupId),
201 m_description(description), 201 m_description(description),
202 m_parent(std::move(parent)) { 202 m_parent(std::move(parent)) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 stackTrace.append(String16::fromInteger(frame.lineNumber())); 276 stackTrace.append(String16::fromInteger(frame.lineNumber()));
277 stackTrace.append(':'); 277 stackTrace.append(':');
278 stackTrace.append(String16::fromInteger(frame.columnNumber())); 278 stackTrace.append(String16::fromInteger(frame.columnNumber()));
279 stackTrace.append(')'); 279 stackTrace.append(')');
280 } 280 }
281 String16 string = stackTrace.toString(); 281 String16 string = stackTrace.toString();
282 return StringBufferImpl::adopt(string); 282 return StringBufferImpl::adopt(string);
283 } 283 }
284 284
285 } // namespace v8_inspector 285 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/v8-runtime-agent-impl.cc ('k') | third_party/inspector_protocol/CodeGenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698