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

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

Issue 2761293002: Correctly annotate v8::StackTrace and v8::StackFrame API methods (Closed)
Patch Set: Rebase Created 3 years, 9 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
« no previous file with comments | « src/api.cc ('k') | no next file » | 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"
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
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
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698