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()); |