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

Side by Side Diff: src/frames.cc

Issue 2132553002: [wasm] Use handles in wasm::GetDebugInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | src/runtime/runtime-debug.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/frames.h" 5 #include "src/frames.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 DCHECK(deopt_data->length() == 2); 1426 DCHECK(deopt_data->length() == 2);
1427 return deopt_data->get(0); 1427 return deopt_data->get(0);
1428 } 1428 }
1429 1429
1430 uint32_t WasmFrame::function_index() const { 1430 uint32_t WasmFrame::function_index() const {
1431 FixedArray* deopt_data = LookupCode()->deoptimization_data(); 1431 FixedArray* deopt_data = LookupCode()->deoptimization_data();
1432 DCHECK(deopt_data->length() == 2); 1432 DCHECK(deopt_data->length() == 2);
1433 return Smi::cast(deopt_data->get(1))->value(); 1433 return Smi::cast(deopt_data->get(1))->value();
1434 } 1434 }
1435 1435
1436 Script* WasmFrame::script() const { 1436 Script* WasmFrame::script() const {
Michael Starzinger 2016/07/08 08:05:07 If {wasm::GetDebugInfo} can really trigger a GC th
1437 JSObject* wasm = JSObject::cast(wasm_obj()); 1437 Handle<JSObject> wasm(JSObject::cast(wasm_obj()), isolate());
1438 Handle<wasm::WasmDebugInfo> debug_info(wasm::GetDebugInfo(wasm), isolate()); 1438 Handle<wasm::WasmDebugInfo> debug_info = wasm::GetDebugInfo(wasm);
1439 return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index()); 1439 return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index());
1440 } 1440 }
1441 1441
1442 namespace { 1442 namespace {
1443 1443
1444 1444
1445 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared, 1445 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared,
1446 Code* code) { 1446 Code* code) {
1447 if (FLAG_max_stack_trace_source_length != 0 && code != NULL) { 1447 if (FLAG_max_stack_trace_source_length != 0 && code != NULL) {
1448 std::ostringstream os; 1448 std::ostringstream os;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1869 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1870 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1870 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1871 list.Add(frame, zone); 1871 list.Add(frame, zone);
1872 } 1872 }
1873 return list.ToVector(); 1873 return list.ToVector();
1874 } 1874 }
1875 1875
1876 1876
1877 } // namespace internal 1877 } // namespace internal
1878 } // namespace v8 1878 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698