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

Unified Diff: runtime/vm/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/snapshot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 97f0d847dcd9e5a7d89a2614a1cbcede2bab1937..746e2ab11152ef5f6e332d3d74d608ea15b69093 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -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),
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698