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

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

Issue 2531163010: [inspector] Introduce debug::WasmScript (Closed)
Patch Set: Fix expected output 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-debugger-agent-impl.cc ('k') | src/inspector/wasm-translation.h » ('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 24 matching lines...) Expand all
35 v8::Local<v8::String> functionNameValue(frame->GetFunctionName()); 35 v8::Local<v8::String> functionNameValue(frame->GetFunctionName());
36 if (!functionNameValue.IsEmpty()) 36 if (!functionNameValue.IsEmpty())
37 functionName = toProtocolString(functionNameValue); 37 functionName = toProtocolString(functionNameValue);
38 38
39 int sourceLineNumber = frame->GetLineNumber() - 1; 39 int sourceLineNumber = frame->GetLineNumber() - 1;
40 int sourceColumn = frame->GetColumn() - 1; 40 int sourceColumn = frame->GetColumn() - 1;
41 // TODO(clemensh): Figure out a way to do this translation only right before 41 // TODO(clemensh): Figure out a way to do this translation only right before
42 // sending the stack trace over wire. 42 // sending the stack trace over wire.
43 if (wasmTranslation) 43 if (wasmTranslation)
44 wasmTranslation->TranslateWasmScriptLocationToProtocolLocation( 44 wasmTranslation->TranslateWasmScriptLocationToProtocolLocation(
45 &scriptId, &sourceLineNumber, &sourceColumn, contextGroupId); 45 &scriptId, &sourceLineNumber, &sourceColumn);
46 return V8StackTraceImpl::Frame(functionName, scriptId, sourceName, 46 return V8StackTraceImpl::Frame(functionName, scriptId, sourceName,
47 sourceLineNumber + 1, sourceColumn + 1); 47 sourceLineNumber + 1, sourceColumn + 1);
48 } 48 }
49 49
50 void toFramesVector(v8::Local<v8::StackTrace> stackTrace, 50 void toFramesVector(v8::Local<v8::StackTrace> stackTrace,
51 std::vector<V8StackTraceImpl::Frame>& frames, 51 std::vector<V8StackTraceImpl::Frame>& frames,
52 size_t maxStackSize, v8::Isolate* isolate, 52 size_t maxStackSize, v8::Isolate* isolate,
53 V8Debugger* debugger, int contextGroupId) { 53 V8Debugger* debugger, int contextGroupId) {
54 DCHECK(isolate->InContext()); 54 DCHECK(isolate->InContext());
55 int frameCount = stackTrace->GetFrameCount(); 55 int frameCount = stackTrace->GetFrameCount();
(...skipping 220 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-debugger-agent-impl.cc ('k') | src/inspector/wasm-translation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698