From e98b1c3ef74bd04270ba28954625cdcee75a21e6 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 23 Jan 2020 16:04:02 -0800 Subject: [PATCH] Do not reset the child isolate preparer if the isolate group data already has one (flutter/engine#15952) See https://github.com/flutter/flutter/issues/49358 --- engine/src/flutter/runtime/dart_isolate.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/runtime/dart_isolate.cc b/engine/src/flutter/runtime/dart_isolate.cc index 31d3084326..fd0c833244 100644 --- a/engine/src/flutter/runtime/dart_isolate.cc +++ b/engine/src/flutter/runtime/dart_isolate.cc @@ -294,9 +294,11 @@ bool DartIsolate::PrepareForRunningFromPrecompiledCode() { return false; } - GetIsolateGroupData().SetChildIsolatePreparer([](DartIsolate* isolate) { - return isolate->PrepareForRunningFromPrecompiledCode(); - }); + if (GetIsolateGroupData().GetChildIsolatePreparer() == nullptr) { + GetIsolateGroupData().SetChildIsolatePreparer([](DartIsolate* isolate) { + return isolate->PrepareForRunningFromPrecompiledCode(); + }); + } const fml::closure& isolate_create_callback = GetIsolateGroupData().GetIsolateCreateCallback();