mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
Fix wrong initialization of is_loaded in LibraryPrefix.
My previous CL did not check if the prefix is deferred or not when deserializing it from the snapshot. BUG= R=rmacnak@google.com Review URL: https://codereview.chromium.org/2413113004 .
This commit is contained in:
parent
701b91eb31
commit
2022348b11
|
@ -2824,7 +2824,7 @@ class LibraryPrefixDeserializationCluster : public DeserializationCluster {
|
|||
}
|
||||
prefix->ptr()->num_imports_ = d->Read<uint16_t>();
|
||||
prefix->ptr()->is_deferred_load_ = d->Read<bool>();
|
||||
prefix->ptr()->is_loaded_ = false;
|
||||
prefix->ptr()->is_loaded_ = !prefix->ptr()->is_deferred_load_;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1189,7 +1189,8 @@ RawLibraryPrefix* LibraryPrefix::ReadFrom(SnapshotReader* reader,
|
|||
reader->Read<int16_t>());
|
||||
prefix.StoreNonPointer(&prefix.raw_ptr()->is_deferred_load_,
|
||||
reader->Read<bool>());
|
||||
prefix.StoreNonPointer(&prefix.raw_ptr()->is_loaded_, false);
|
||||
prefix.StoreNonPointer(&prefix.raw_ptr()->is_loaded_,
|
||||
!prefix.raw_ptr()->is_deferred_load_);
|
||||
|
||||
// Set all the object fields.
|
||||
READ_OBJECT_FIELDS(prefix,
|
||||
|
|
Loading…
Reference in a new issue