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

Side by Side Diff: src/messages.cc

Issue 2551053002: [wasm] Always provide a wasm instance object at runtime (Closed)
Patch Set: Rebase 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/isolate.cc ('k') | 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 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
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
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
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698