@@ -213,6 +213,7 @@ bool DartComponentControllerV2::CreateAndBindNamespace() {
213213
214214bool DartComponentControllerV2::SetUpFromKernel () {
215215 dart_utils::MappedResource manifest;
216+
216217 if (!dart_utils::MappedResource::LoadFromNamespace (
217218 namespace_, data_path_ + " /app.dilplist" , manifest)) {
218219 return false ;
@@ -223,14 +224,10 @@ bool DartComponentControllerV2::SetUpFromKernel() {
223224 isolate_snapshot_data_)) {
224225 return false ;
225226 }
226- if (!dart_utils::MappedResource::LoadFromNamespace (
227- nullptr , " /pkg/data/isolate_core_snapshot_instructions.bin" ,
228- isolate_snapshot_instructions_, true /* executable */ )) {
229- return false ;
230- }
231227
228+ // The core snapshot does not separate instructions from data.
232229 if (!CreateIsolate (isolate_snapshot_data_.address (),
233- isolate_snapshot_instructions_. address () )) {
230+ nullptr /* isolate_snapshot_instructions */ )) {
234231 return false ;
235232 }
236233
@@ -295,16 +292,16 @@ bool DartComponentControllerV2::SetUpFromAppSnapshot() {
295292 return false ;
296293 }
297294 } else {
295+ // TODO(fxb/91200): This code path was broken for over a year and is
296+ // probably not used.
298297 if (!dart_utils::MappedResource::LoadFromNamespace (
299298 namespace_, data_path_ + " /isolate_snapshot_data.bin" ,
300299 isolate_snapshot_data_)) {
301300 return false ;
302301 }
303- if (!dart_utils::MappedResource::LoadFromNamespace (
304- namespace_, data_path_ + " /isolate_snapshot_instructions.bin" ,
305- isolate_snapshot_instructions_, true /* executable */ )) {
306- return false ;
307- }
302+ isolate_data = isolate_snapshot_data_.address ();
303+ // We don't separate instructions from data in 'core' snapshots.
304+ isolate_instructions = nullptr ;
308305 }
309306 return CreateIsolate (isolate_data, isolate_instructions);
310307#endif // defined(AOT_RUNTIME)
0 commit comments