Skip to content

Commit

Permalink
Uplift of #10366 (squashed) to release
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Oct 5, 2021
1 parent 2a67cdb commit 5baddc9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions patches/v8/src-wasm-module-compiler.cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc
index ea714cbe4c58673b5663ab93b37d1adefe43b813..303270059deab54a6d59eaad92109678496da8ee 100644
--- a/src/wasm/module-compiler.cc
+++ b/src/wasm/module-compiler.cc
@@ -3052,13 +3052,13 @@ void CompilationStateImpl::InitializeCompilationProgressAfterDeserialization(
}
compilation_progress_.assign(module->num_declared_functions,
kProgressAfterDeserialization);
- uint32_t num_imported_functions = module->num_imported_functions;
for (auto func_index : missing_functions) {
if (FLAG_wasm_lazy_compilation) {
- native_module_->UseLazyStub(num_imported_functions + func_index);
+ native_module_->UseLazyStub(func_index);
}
- compilation_progress_[func_index] = SetupCompilationProgressForFunction(
- lazy_module, module, enabled_features, func_index);
+ compilation_progress_[declared_function_index(module, func_index)] =
+ SetupCompilationProgressForFunction(lazy_module, module,
+ enabled_features, func_index);
}
}
auto builder = std::make_unique<CompilationUnitBuilder>(native_module_);

0 comments on commit 5baddc9

Please sign in to comment.