Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: runtime/vm/clustered_snapshot.cc

Issue 2720123004: VM: Make Dart::FeaturesString respect isolate flags controlling asserts and type checks. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/clustered_snapshot.h ('k') | runtime/vm/dart.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/clustered_snapshot.cc
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 1735bdcbad7db55aac460754a8dbcc4a890e6995..c64f180f0e09db61b73073e526d7e48afbd768a2 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -4648,7 +4648,8 @@ void Serializer::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),
@@ -4986,7 +4987,7 @@ DeserializationCluster* Deserializer::ReadCluster() {
}
-RawApiError* Deserializer::VerifyVersionAndFeatures() {
+RawApiError* Deserializer::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.
@@ -5023,7 +5024,7 @@ RawApiError* Deserializer::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);
@@ -5475,7 +5476,7 @@ RawApiError* FullSnapshotReader::ReadVMSnapshot() {
Deserializer deserializer(thread_, kind_, buffer_, size_,
instructions_buffer_, data_buffer_);
- RawApiError* error = deserializer.VerifyVersionAndFeatures();
+ RawApiError* error = deserializer.VerifyVersionAndFeatures(/*isolate=*/NULL);
if (error != ApiError::null()) {
return error;
}
@@ -5499,7 +5500,8 @@ RawApiError* FullSnapshotReader::ReadIsolateSnapshot() {
Deserializer deserializer(thread_, kind_, buffer_, size_,
instructions_buffer_, data_buffer_);
- RawApiError* error = deserializer.VerifyVersionAndFeatures();
+ RawApiError* error =
+ deserializer.VerifyVersionAndFeatures(thread_->isolate());
if (error != ApiError::null()) {
return error;
}
« no previous file with comments | « runtime/vm/clustered_snapshot.h ('k') | runtime/vm/dart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698