- Do not even attempt to spawn an isolate if the local script

URI cannot be determined.

BUG=

Review URL: https://codereview.chromium.org/1586003003 .
This commit is contained in:
Ivan Posva 2016-01-15 00:48:54 -08:00
parent 82aeb1997e
commit 04debc9c82

View file

@ -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,