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

Unified Diff: src/wasm/wasm-module.cc

Issue 2262103002: [wasm] Pass the context to ToJS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix-imports-context
Patch Set: Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index f16810c72c71716dd22849c5235d5afbcaab6e53..1b26441e8e1e2fd27599f8ce25d0ed1f41a5ca14 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -1145,7 +1145,8 @@ MaybeHandle<FixedArray> WasmModule::CompileFunctions(
Handle<Code> code =
temp_instance_for_compilation.function_code[exp.func_index];
Handle<Code> export_code = compiler::CompileJSToWasmWrapper(
- isolate, &module_env, code, exp.func_index);
+ isolate, temp_instance_for_compilation.context, &module_env, code,
+ exp.func_index);
if (thrower->error()) return nothing;
export_metadata->set(kExportCode, *export_code);
export_metadata->set(kExportName, *name);
@@ -1169,8 +1170,9 @@ MaybeHandle<FixedArray> WasmModule::CompileFunctions(
if (startup_fct.is_null()) {
Handle<Code> code = temp_instance_for_compilation.function_code[index];
DCHECK_EQ(0, functions[index].sig->parameter_count());
- startup_fct =
- compiler::CompileJSToWasmWrapper(isolate, &module_env, code, index);
+ startup_fct = compiler::CompileJSToWasmWrapper(
+ isolate, temp_instance_for_compilation.context, &module_env, code,
+ index);
}
Handle<FixedArray> metadata =
factory->NewFixedArray(kWasmExportMetadataTableSize, TENURED);

Powered by Google App Engine
This is Rietveld 408576698