Skip to content

Commit 7860c96

Browse files
thibaudmichaudV8 LUCI CQ
authored andcommitted
[wasm] Skip WasmJSFunctions in js-to-wasm wrapper tier-up
When a js-to-wasm wrapper tiers up, we also set the newly compiled wrapper as the target for other exports that have the same signature. This assumed that all exports have type WasmExportedFunction, but they can also have type WasmJSFunction in the case of a re-exported WebAssembly.Function import. [email protected] Fixed: 362539773 Change-Id: I190a680ac5726122e2124977668bba3a95df93b5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5822928 Reviewed-by: Clemens Backes <[email protected]> Commit-Queue: Thibaud Michaud <[email protected]> Cr-Commit-Position: refs/heads/main@{#95877}
1 parent bb43776 commit 7860c96

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/runtime/runtime-wasm.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ void ReplaceJSToWasmWrapper(
547547
CHECK(trusted_instance_data->try_get_func_ref(function_index, &func_ref));
548548
Tagged<JSFunction> external_function;
549549
CHECK(func_ref->internal(isolate)->try_get_external(&external_function));
550+
if (external_function->shared()->HasWasmJSFunctionData()) return;
551+
CHECK(external_function->shared()->HasWasmExportedFunctionData());
550552
external_function->UpdateCode(*wrapper_code);
551553
Tagged<WasmExportedFunctionData> function_data =
552554
external_function->shared()->wasm_exported_function_data();

0 commit comments

Comments
 (0)