Index: runtime/vm/dart_api_impl.h |
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h |
index 742f80c4424c4dc5818a9a7e0a8f8e2274a01422..2f635d3097092a3cb4be4f681c8be1b27461759c 100644 |
--- a/runtime/vm/dart_api_impl.h |
+++ b/runtime/vm/dart_api_impl.h |
@@ -316,6 +316,12 @@ class IsolateSaver { |
return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ |
} \ |
+#define CHECK_COMPILATION_ALLOWED(isolate) \ |
+ if (!isolate->compilation_allowed()) { \ |
+ return Api::NewError("%s: Cannot load after Dart_Precompile", \ |
+ CURRENT_FUNC); \ |
+ } \ |
+ |
#define ASSERT_CALLBACK_STATE(isolate) \ |
ASSERT(isolate->no_callback_scope_depth() == 0) |