| Index: runtime/vm/snapshot.cc
|
| diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
|
| index 97f0d847dcd9e5a7d89a2614a1cbcede2bab1937..5eddb352d215ad7181971cce4d986141d86fd26f 100644
|
| --- a/runtime/vm/snapshot.cc
|
| +++ b/runtime/vm/snapshot.cc
|
| @@ -513,7 +513,7 @@ RawObject* SnapshotReader::ReadInstance(intptr_t object_id,
|
| pobj_ = ReadObjectImpl(read_as_reference);
|
| result->SetFieldAtOffset(offset, pobj_);
|
| if ((offset != type_argument_field_offset) &&
|
| - (kind_ == Snapshot::kMessage) && FLAG_use_field_guards) {
|
| + (kind_ == Snapshot::kMessage) && isolate()->use_field_guards()) {
|
| // TODO(fschneider): Consider hoisting these lookups out of the loop.
|
| // This would involve creating a handle, since cls_ can't be reused
|
| // across the call to ReadObjectImpl.
|
| @@ -580,7 +580,7 @@ RawObject* SnapshotReader::ReadScriptSnapshot() {
|
| ASSERT(kind_ == Snapshot::kScript);
|
|
|
| // First read the version string, and check that it matches.
|
| - RawApiError* error = VerifyVersionAndFeatures();
|
| + RawApiError* error = VerifyVersionAndFeatures(Isolate::Current());
|
| if (error != ApiError::null()) {
|
| return error;
|
| }
|
| @@ -602,7 +602,7 @@ RawObject* SnapshotReader::ReadScriptSnapshot() {
|
| }
|
|
|
|
|
| -RawApiError* SnapshotReader::VerifyVersionAndFeatures() {
|
| +RawApiError* SnapshotReader::VerifyVersionAndFeatures(Isolate* isolate) {
|
| // If the version string doesn't match, return an error.
|
| // Note: New things are allocated only if we're going to return an error.
|
|
|
| @@ -639,7 +639,7 @@ RawApiError* SnapshotReader::VerifyVersionAndFeatures() {
|
| }
|
| Advance(version_len);
|
|
|
| - const char* expected_features = Dart::FeaturesString(kind_);
|
| + const char* expected_features = Dart::FeaturesString(isolate, kind_);
|
| ASSERT(expected_features != NULL);
|
| const intptr_t expected_len = strlen(expected_features);
|
|
|
| @@ -1842,7 +1842,8 @@ void SnapshotWriter::WriteVersionAndFeatures() {
|
| const intptr_t version_len = strlen(expected_version);
|
| WriteBytes(reinterpret_cast<const uint8_t*>(expected_version), version_len);
|
|
|
| - const char* expected_features = Dart::FeaturesString(kind_);
|
| + const char* expected_features =
|
| + Dart::FeaturesString(Isolate::Current(), kind_);
|
| ASSERT(expected_features != NULL);
|
| const intptr_t features_len = strlen(expected_features);
|
| WriteBytes(reinterpret_cast<const uint8_t*>(expected_features),
|
|
|