Skip to content

Commit 30990cb

Browse files
authored
Merge pull request #10366 from /issues/18562
Add v8 patch to fix invalid WASM compilation.
2 parents 965f45a + 14a9ff7 commit 30990cb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc
2+
index ea714cbe4c58673b5663ab93b37d1adefe43b813..303270059deab54a6d59eaad92109678496da8ee 100644
3+
--- a/src/wasm/module-compiler.cc
4+
+++ b/src/wasm/module-compiler.cc
5+
@@ -3052,13 +3052,13 @@ void CompilationStateImpl::InitializeCompilationProgressAfterDeserialization(
6+
}
7+
compilation_progress_.assign(module->num_declared_functions,
8+
kProgressAfterDeserialization);
9+
- uint32_t num_imported_functions = module->num_imported_functions;
10+
for (auto func_index : missing_functions) {
11+
if (FLAG_wasm_lazy_compilation) {
12+
- native_module_->UseLazyStub(num_imported_functions + func_index);
13+
+ native_module_->UseLazyStub(func_index);
14+
}
15+
- compilation_progress_[func_index] = SetupCompilationProgressForFunction(
16+
- lazy_module, module, enabled_features, func_index);
17+
+ compilation_progress_[declared_function_index(module, func_index)] =
18+
+ SetupCompilationProgressForFunction(lazy_module, module,
19+
+ enabled_features, func_index);
20+
}
21+
}
22+
auto builder = std::make_unique<CompilationUnitBuilder>(native_module_);

0 commit comments

Comments
 (0)