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

Unified Diff: runtime/lib/isolate.cc

Issue 1502473002: Throw an exception when attempting to use Isolate.spawnUri under precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate.cc
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index daa9791675541334e873184f793257fc557cfc15..dc5279824024337979b7a34babd3307d92ddc72c 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -317,6 +317,13 @@ DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 12) {
GET_NATIVE_ARGUMENT(String, package_root, arguments->NativeArgAt(10));
GET_NATIVE_ARGUMENT(Array, packages, arguments->NativeArgAt(11));
+ if (Dart::IsRunningPrecompiledCode()) {
+ const Array& args = Array::Handle(Array::New(1));
+ args.SetAt(0, String::Handle(String::New(
+ "Isolate.spawnUri not supported under precompilation")));
+ Exceptions::ThrowByType(Exceptions::kUnsupported, args);
+ UNREACHABLE();
+ }
// Canonicalize the uri with respect to the current isolate.
const Library& root_lib =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698