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

Unified Diff: runtime/lib/isolate_patch.dart

Issue 1586003003: - Do not even attempt to spawn an isolate if the local script (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « 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_patch.dart
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index c93c27dc30cde0525d42bb3853146868353cb1eb..09ae531fecd09a63a4ed8963c9c5b38f90a9a9ca 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -320,10 +320,13 @@ patch class Isolate {
}
var script = VMLibraryHooks.platformScript;
- if (script != null) {
- if (script.scheme == "package") {
- script = await Isolate.resolvePackageUri(script);
- }
+ if (script == null) {
+ // We do not have enough information to support spawning the new
+ // isolate.
+ throw new UnsupportedError("Isolate.spawn");
+ }
+ if (script.scheme == "package") {
+ script = await Isolate.resolvePackageUri(script);
}
_spawnFunction(readyPort.sendPort, script.toString(), entryPoint, message,
« 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