OLD | NEW |
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" |
11 | 11 |
12 #include "include/v8-version.h" | 12 #include "include/v8-version.h" |
13 | 13 |
14 namespace v8_inspector { | 14 namespace v8_inspector { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 static const v8::StackTrace::StackTraceOptions stackTraceOptions = | 18 static const v8::StackTrace::StackTraceOptions stackTraceOptions = |
19 static_cast<v8::StackTrace::StackTraceOptions>( | 19 static_cast<v8::StackTrace::StackTraceOptions>( |
20 v8::StackTrace::kLineNumber | v8::StackTrace::kColumnOffset | | 20 v8::StackTrace::kLineNumber | v8::StackTrace::kColumnOffset | |
21 v8::StackTrace::kScriptId | v8::StackTrace::kScriptNameOrSourceURL | | 21 v8::StackTrace::kScriptId | v8::StackTrace::kScriptNameOrSourceURL | |
22 v8::StackTrace::kFunctionName); | 22 v8::StackTrace::kFunctionName | |
| 23 v8::StackTrace::kExposeFramesAcrossSecurityOrigins); |
23 | 24 |
24 V8StackTraceImpl::Frame toFrame(v8::Local<v8::StackFrame> frame, | 25 V8StackTraceImpl::Frame toFrame(v8::Local<v8::StackFrame> frame, |
25 WasmTranslation* wasmTranslation, | 26 WasmTranslation* wasmTranslation, |
26 int contextGroupId) { | 27 int contextGroupId) { |
27 String16 scriptId = String16::fromInteger(frame->GetScriptId()); | 28 String16 scriptId = String16::fromInteger(frame->GetScriptId()); |
28 String16 sourceName; | 29 String16 sourceName; |
29 v8::Local<v8::String> sourceNameValue(frame->GetScriptNameOrSourceURL()); | 30 v8::Local<v8::String> sourceNameValue(frame->GetScriptNameOrSourceURL()); |
30 if (!sourceNameValue.IsEmpty()) | 31 if (!sourceNameValue.IsEmpty()) |
31 sourceName = toProtocolString(sourceNameValue); | 32 sourceName = toProtocolString(sourceNameValue); |
32 | 33 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 stackTrace.append(String16::fromInteger(frame.lineNumber())); | 298 stackTrace.append(String16::fromInteger(frame.lineNumber())); |
298 stackTrace.append(':'); | 299 stackTrace.append(':'); |
299 stackTrace.append(String16::fromInteger(frame.columnNumber())); | 300 stackTrace.append(String16::fromInteger(frame.columnNumber())); |
300 stackTrace.append(')'); | 301 stackTrace.append(')'); |
301 } | 302 } |
302 String16 string = stackTrace.toString(); | 303 String16 string = stackTrace.toString(); |
303 return StringBufferImpl::adopt(string); | 304 return StringBufferImpl::adopt(string); |
304 } | 305 } |
305 | 306 |
306 } // namespace v8_inspector | 307 } // namespace v8_inspector |
OLD | NEW |