@@ -571,8 +571,7 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
571571 // returned {wasm_code} to be null and fall back to {GetContainingCode}.
572572 wasm::WasmCodeRefScope code_ref_scope;
573573 if (wasm::WasmCode* wasm_code =
574- iterator->isolate ()->wasm_engine ()->code_manager ()->LookupCode (
575- pc)) {
574+ wasm::GetWasmEngine ()->code_manager ()->LookupCode (pc)) {
576575 switch (wasm_code->kind ()) {
577576 case wasm::WasmCode::kFunction :
578577 return WASM ;
@@ -946,7 +945,7 @@ void CommonFrame::IterateCompiledFrame(RootVisitor* v) const {
946945
947946#if V8_ENABLE_WEBASSEMBLY
948947 if (auto * wasm_code =
949- isolate ()-> wasm_engine ()->code_manager ()->LookupCode (inner_pointer)) {
948+ wasm::GetWasmEngine ()->code_manager ()->LookupCode (inner_pointer)) {
950949 is_wasm = true ;
951950 SafepointTable table (wasm_code);
952951 safepoint_entry = table.FindEntry (inner_pointer);
@@ -982,7 +981,7 @@ void CommonFrame::IterateCompiledFrame(RootVisitor* v) const {
982981 // directly call a Wasm function from JavaScript. In this case the
983982 // parameters we pass to the callee are not tagged.
984983 wasm::WasmCode* wasm_callee =
985- isolate ()-> wasm_engine ()->code_manager ()->LookupCode (callee_pc ());
984+ wasm::GetWasmEngine ()->code_manager ()->LookupCode (callee_pc ());
986985 bool is_wasm_call = (wasm_callee != nullptr );
987986 if (is_wasm_call) has_tagged_outgoing_params = false ;
988987#endif // V8_ENABLE_WEBASSEMBLY
@@ -1862,8 +1861,7 @@ void WasmFrame::Print(StringStream* accumulator, PrintMode mode,
18621861 wasm::WasmCodeRefScope code_ref_scope;
18631862 accumulator->Add (" WASM [" );
18641863 accumulator->PrintName (script ().name ());
1865- Address instruction_start = isolate ()
1866- ->wasm_engine ()
1864+ Address instruction_start = wasm::GetWasmEngine ()
18671865 ->code_manager ()
18681866 ->LookupCode (pc ())
18691867 ->instruction_start ();
@@ -1886,7 +1884,7 @@ void WasmFrame::Print(StringStream* accumulator, PrintMode mode,
18861884}
18871885
18881886wasm::WasmCode* WasmFrame::wasm_code () const {
1889- return isolate ()-> wasm_engine ()->code_manager ()->LookupCode (pc ());
1887+ return wasm::GetWasmEngine ()->code_manager ()->LookupCode (pc ());
18901888}
18911889
18921890WasmInstanceObject WasmFrame::wasm_instance () const {
@@ -1948,7 +1946,7 @@ bool WasmFrame::at_to_number_conversion() const {
19481946 // ToNumber conversion call.
19491947 wasm::WasmCode* code =
19501948 callee_pc () != kNullAddress
1951- ? isolate ()-> wasm_engine ()->code_manager ()->LookupCode (callee_pc ())
1949+ ? wasm::GetWasmEngine ()->code_manager ()->LookupCode (callee_pc ())
19521950 : nullptr ;
19531951 if (!code || code->kind () != wasm::WasmCode::kWasmToJsWrapper ) return false ;
19541952 int offset = static_cast <int >(callee_pc () - code->instruction_start ());
@@ -1961,7 +1959,7 @@ bool WasmFrame::at_to_number_conversion() const {
19611959
19621960int WasmFrame::LookupExceptionHandlerInTable () {
19631961 wasm::WasmCode* code =
1964- isolate ()-> wasm_engine ()->code_manager ()->LookupCode (pc ());
1962+ wasm::GetWasmEngine ()->code_manager ()->LookupCode (pc ());
19651963 if (!code->IsAnonymous () && code->handler_table_size () > 0 ) {
19661964 HandlerTable table (code);
19671965 int pc_offset = static_cast <int >(pc () - code->instruction_start ());
@@ -1973,7 +1971,7 @@ int WasmFrame::LookupExceptionHandlerInTable() {
19731971void WasmDebugBreakFrame::Iterate (RootVisitor* v) const {
19741972 DCHECK (caller_pc ());
19751973 wasm::WasmCode* code =
1976- isolate ()-> wasm_engine ()->code_manager ()->LookupCode (caller_pc ());
1974+ wasm::GetWasmEngine ()->code_manager ()->LookupCode (caller_pc ());
19771975 DCHECK (code);
19781976 SafepointTable table (code);
19791977 SafepointEntry safepoint_entry = table.FindEntry (caller_pc ());
0 commit comments