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

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

Issue 2656463004: [wasm][asm.js] Allow asm.js->wasm codegen in unsafe-eval situations. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | test/mjsunit/wasm/asm-with-wasm-off.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index 646b6dc797d75d0f54806e20eeae61fcbfdeaaa0..d467297a787c669c0b9cb020b11e76369182931d 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -2237,7 +2237,8 @@ MaybeHandle<WasmModuleObject> wasm::CreateModuleObjectFromBytes(
Vector<const byte> asm_js_offset_table_bytes) {
MaybeHandle<WasmModuleObject> nothing;
- if (!IsWasmCodegenAllowed(isolate, isolate->native_context())) {
+ if (origin != kAsmJsOrigin &&
+ !IsWasmCodegenAllowed(isolate, isolate->native_context())) {
thrower->CompileError("Wasm code generation disallowed in this context");
return nothing;
}
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | test/mjsunit/wasm/asm-with-wasm-off.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698