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

Unified Diff: src/api.cc

Issue 2722213002: [ValueSerializer] Allow wire format versions beginning with 13 to be deserialized in non-legacy mod… (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 13b6e7b42486bf5963175b678746b4d22ae99efe..cfd51a30d220ee4f670f0ffd477fa44ea3abddab 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3273,10 +3273,9 @@ Maybe<bool> ValueDeserializer::ReadHeader(Local<Context> context) {
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
DCHECK(read_header);
- // TODO(jbroman): Today, all wire formats are "legacy". When a more supported
- // format is added, compare the version of the internal serializer to the
- // minimum non-legacy version number.
- if (!private_->supports_legacy_wire_format) {
+ static const uint32_t kMinimumNonLegacyVersion = 13;
+ if (GetWireFormatVersion() < kMinimumNonLegacyVersion &&
+ !private_->supports_legacy_wire_format) {
isolate->Throw(*isolate->factory()->NewError(
i::MessageTemplate::kDataCloneDeserializationVersionError));
has_pending_exception = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698