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

Unified Diff: src/runtime/runtime-test.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.h ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 8b0229069f757ccb570e1a1c4a18c82eb1e18f01..8176cbfa69bc3f063917f6d8573c9dfbf87eeabe 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -699,6 +699,21 @@ RUNTIME_FUNCTION(Runtime_IsAsmWasmCode) {
return isolate->heap()->true_value();
}
+namespace {
+bool DisallowCodegenFromStringsCallback(v8::Local<v8::Context> context) {
+ return false;
+}
+}
+
+RUNTIME_FUNCTION(Runtime_DisallowCodegenFromStrings) {
+ SealHandleScope shs(isolate);
+ DCHECK_EQ(0, args.length());
+ v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
+ v8_isolate->SetAllowCodeGenerationFromStringsCallback(
+ DisallowCodegenFromStringsCallback);
+ return isolate->heap()->undefined_value();
+}
+
RUNTIME_FUNCTION(Runtime_IsWasmCode) {
SealHandleScope shs(isolate);
DCHECK_EQ(1, args.length());
« no previous file with comments | « src/runtime/runtime.h ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698