未验证 提交 624cf7e2 编写于 作者: R Ryan Macnak 提交者: GitHub

Fix Dart 2 reload when running from a snapshot instead of platform.dill. (#5792)

Without this flag, the VM will attempt to interpret a kernel file as source code.

Affects Fuchsia (FL-71) and code-push.
上级 16da4710
......@@ -720,6 +720,16 @@ 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;
}
flags->use_dart_frontend = true;
// Create the Dart VM isolate and give it the embedder object as the baton.
Dart_Isolate isolate =
(vm->GetPlatformKernel().GetSize() > 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册