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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1377733007: Error quickly if the embedder tries to load after Dart_Precompile. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « runtime/vm/dart_api_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 3aa65160d8cd131307c1bbb8d71e3d38085064dc..44e8ab056abde101d2f83f060065021c960af04c 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5075,6 +5075,7 @@ DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
CURRENT_FUNC);
}
CHECK_CALLBACK_STATE(I);
+ CHECK_COMPILATION_ALLOWED(I);
NoHeapGrowthControlScope no_growth_control;
@@ -5118,6 +5119,7 @@ DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer,
CURRENT_FUNC, library_url.ToCString());
}
CHECK_CALLBACK_STATE(I);
+ CHECK_COMPILATION_ALLOWED(I);
ASSERT(snapshot->kind() == Snapshot::kScript);
ScriptSnapshotReader reader(snapshot->content(), snapshot->length(), T);
@@ -5311,6 +5313,7 @@ DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url,
CURRENT_FUNC);
}
CHECK_CALLBACK_STATE(I);
+ CHECK_COMPILATION_ALLOWED(I);
NoHeapGrowthControlScope no_growth_control;
@@ -5368,6 +5371,7 @@ DART_EXPORT Dart_Handle Dart_LibraryImportLibrary(Dart_Handle library,
RETURN_TYPE_ERROR(I, prefix, String);
}
CHECK_CALLBACK_STATE(I);
+ CHECK_COMPILATION_ALLOWED(I);
const String& prefix_symbol = String::Handle(Z, Symbols::New(prefix_vm));
const Namespace& import_ns = Namespace::Handle(Z,
@@ -5416,6 +5420,7 @@ DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library,
CURRENT_FUNC);
}
CHECK_CALLBACK_STATE(I);
+ CHECK_COMPILATION_ALLOWED(I);
NoHeapGrowthControlScope no_growth_control;
@@ -5445,6 +5450,7 @@ DART_EXPORT Dart_Handle Dart_LibraryLoadPatch(Dart_Handle library,
RETURN_TYPE_ERROR(I, patch_source, String);
}
CHECK_CALLBACK_STATE(I);
+ CHECK_COMPILATION_ALLOWED(I);
NoHeapGrowthControlScope no_growth_control;
« no previous file with comments | « runtime/vm/dart_api_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698