diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index beefd61bdb6b9d..8ede1071d6a7fb 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -3273,10 +3273,9 @@ Maybe ValueDeserializer::ReadHeader(Local 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;