OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/messages.h" | 5 #include "src/messages.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/execution.h" | 10 #include "src/execution.h" |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 Handle<Object> WasmStackFrame::GetFunction() const { | 652 Handle<Object> WasmStackFrame::GetFunction() const { |
653 Handle<Object> obj(Smi::FromInt(wasm_func_index_), isolate_); | 653 Handle<Object> obj(Smi::FromInt(wasm_func_index_), isolate_); |
654 return obj; | 654 return obj; |
655 } | 655 } |
656 | 656 |
657 Handle<Object> WasmStackFrame::GetFunctionName() { | 657 Handle<Object> WasmStackFrame::GetFunctionName() { |
658 Handle<Object> name; | 658 Handle<Object> name; |
659 Handle<WasmCompiledModule> compiled_module( | 659 Handle<WasmCompiledModule> compiled_module( |
660 Handle<WasmInstanceObject>::cast(wasm_instance_)->get_compiled_module(), | 660 Handle<WasmInstanceObject>::cast(wasm_instance_)->get_compiled_module(), |
661 isolate_); | 661 isolate_); |
662 if (!WasmCompiledModule::GetFunctionName(compiled_module, wasm_func_index_) | 662 if (!WasmCompiledModule::GetFunctionNameOrNull(isolate_, compiled_module, |
| 663 wasm_func_index_) |
663 .ToHandle(&name)) { | 664 .ToHandle(&name)) { |
664 name = isolate_->factory()->null_value(); | 665 name = isolate_->factory()->null_value(); |
665 } | 666 } |
666 return name; | 667 return name; |
667 } | 668 } |
668 | 669 |
669 MaybeHandle<String> WasmStackFrame::ToString() { | 670 MaybeHandle<String> WasmStackFrame::ToString() { |
670 IncrementalStringBuilder builder(isolate_); | 671 IncrementalStringBuilder builder(isolate_); |
671 | 672 |
672 Handle<Object> name = GetFunctionName(); | 673 Handle<Object> name = GetFunctionName(); |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 DCHECK(mode != SKIP_UNTIL_SEEN); | 1232 DCHECK(mode != SKIP_UNTIL_SEEN); |
1232 | 1233 |
1233 Handle<Object> no_caller; | 1234 Handle<Object> no_caller; |
1234 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); | 1235 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); |
1235 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, | 1236 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, |
1236 no_caller, false); | 1237 no_caller, false); |
1237 } | 1238 } |
1238 | 1239 |
1239 } // namespace internal | 1240 } // namespace internal |
1240 } // namespace v8 | 1241 } // namespace v8 |
OLD | NEW |