Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Reapply "Fix Dart 2 reload when running from a snapshot instead of pl… #5830

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions runtime/dart_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,20 @@ DartIsolate::CreateDartVMAndEmbedderObjectPair(
);
}

// TODO(rmacnak): This flag setting business preserves a side effect of using
// Dart_CreateIsolateFromKernel. It should be removed when some of the
// internal logic in reload no longer uses this flag.
Dart_IsolateFlags nonnull_flags;
if (flags == nullptr) {
Dart_IsolateFlagsInitialize(&nonnull_flags);
flags = &nonnull_flags;
}
bool dart2 = (vm->GetPlatformKernel().GetSize() > 0) ||
Dart_IsDart2Snapshot(embedder_isolate->GetIsolateSnapshot()
->GetData()
->GetSnapshotPointer());
flags->use_dart_frontend = dart2;

// Create the Dart VM isolate and give it the embedder object as the baton.
Dart_Isolate isolate =
(vm->GetPlatformKernel().GetSize() > 0)
Expand Down