mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:57:43 +00:00
Make the VM resilient to a confusion between a NULL instructions snapshot and instructions snapshot that is an empty array in the Flutter embedder.
Related to issue #28504 R=fschneider@google.com Review-Url: https://codereview.chromium.org/2648383006 .
This commit is contained in:
parent
1e8558a3a6
commit
ed00447138
|
@ -5479,10 +5479,10 @@ RawApiError* FullSnapshotReader::ReadVMSnapshot() {
|
|||
return error;
|
||||
}
|
||||
|
||||
if (instructions_buffer_ != NULL) {
|
||||
if (Snapshot::IncludesCode(kind_)) {
|
||||
ASSERT(instructions_buffer_ != NULL);
|
||||
thread_->isolate()->SetupInstructionsSnapshotPage(instructions_buffer_);
|
||||
}
|
||||
if (data_buffer_ != NULL) {
|
||||
ASSERT(data_buffer_ != NULL);
|
||||
thread_->isolate()->SetupDataSnapshotPage(data_buffer_);
|
||||
}
|
||||
|
||||
|
@ -5501,10 +5501,10 @@ RawApiError* FullSnapshotReader::ReadIsolateSnapshot() {
|
|||
return error;
|
||||
}
|
||||
|
||||
if (instructions_buffer_ != NULL) {
|
||||
if (Snapshot::IncludesCode(kind_)) {
|
||||
ASSERT(instructions_buffer_ != NULL);
|
||||
thread_->isolate()->SetupInstructionsSnapshotPage(instructions_buffer_);
|
||||
}
|
||||
if (data_buffer_ != NULL) {
|
||||
ASSERT(data_buffer_ != NULL);
|
||||
thread_->isolate()->SetupDataSnapshotPage(data_buffer_);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue