Commit a927f81c authored by jbroman's avatar jbroman Committed by Commit bot

[ValueSerializer] Allow wire format versions beginning with 13 to be...

[ValueSerializer] Allow wire format versions beginning with 13 to be deserialized in non-legacy mode.

As of version 13, delegates do not need to worry about colliding tags with the
tags reserved by v8, since v8 inserts a "host object" prefix beforehand. Thus
the format is now suitable for more general use, without opting into the "legacy"
mode that had this caveat.

Review-Url: https://codereview.chromium.org/2722213002
Cr-Commit-Position: refs/heads/master@{#43521}
parent a8e15e8f
...@@ -3273,10 +3273,9 @@ Maybe<bool> ValueDeserializer::ReadHeader(Local<Context> context) { ...@@ -3273,10 +3273,9 @@ Maybe<bool> ValueDeserializer::ReadHeader(Local<Context> context) {
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool); RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
DCHECK(read_header); DCHECK(read_header);
// TODO(jbroman): Today, all wire formats are "legacy". When a more supported static const uint32_t kMinimumNonLegacyVersion = 13;
// format is added, compare the version of the internal serializer to the if (GetWireFormatVersion() < kMinimumNonLegacyVersion &&
// minimum non-legacy version number. !private_->supports_legacy_wire_format) {
if (!private_->supports_legacy_wire_format) {
isolate->Throw(*isolate->factory()->NewError( isolate->Throw(*isolate->factory()->NewError(
i::MessageTemplate::kDataCloneDeserializationVersionError)); i::MessageTemplate::kDataCloneDeserializationVersionError));
has_pending_exception = true; has_pending_exception = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment