[VM] Avoid deadlock by allowing us to run kernel isolate from a script snapshot, fixes all dartk-sim* builders

Currently on sim* architectures we use a script snapshot (and not an app
jit snapshot, as we normally do) for the kernel isolate.
  -> See utils/application_snapshot.gni:declare_args()

The change in [0] causes a deadlock where we try to compile the kernel
isolate (or rather a script snapshot of it) via the kernel isolate.

This CL fixes all the dartk-sim* builders by allowing us to run the
kernel snapshot from a script snapshot.

[0] https://dart-review.googlesource.com/52986

Change-Id: I513993f7c78310165d90f7622879482598f1e577
Reviewed-on: https://dart-review.googlesource.com/53380
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
Martin Kustermann 2018-05-02 13:52:46 +00:00
parent 0bc6e7217a
commit 1fcd896ed9

View file

@ -262,7 +262,7 @@ static Dart_Isolate IsolateSetupHelper(Dart_Isolate isolate,
#if !defined(DART_PRECOMPILED_RUNTIME)
if (dfe.UseDartFrontend() && !isolate_run_app_snapshot &&
kernel_program == NULL) {
kernel_program == NULL && !Dart_IsKernelIsolate(isolate)) {
if (!dfe.CanUseDartFrontend()) {
const char* format = "Dart frontend unavailable to compile script %s.";
intptr_t len = snprintf(NULL, 0, format, script_uri) + 1;