Skip to content

Commit 6690415

Browse files
addaleaxtargos
authored andcommitted
deps: cherry-pick a927f81c7 from V8 upstream
Original commit message: [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} PR-URL: #11752 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
1 parent 0f3e69d commit 6690415

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

deps/v8/src/api.cc

+3-4
Original file line numberDiff line numberDiff line change
@@ -3273,10 +3273,9 @@ Maybe<bool> ValueDeserializer::ReadHeader(Local<Context> context) {
32733273
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
32743274
DCHECK(read_header);
32753275

3276-
// TODO(jbroman): Today, all wire formats are "legacy". When a more supported
3277-
// format is added, compare the version of the internal serializer to the
3278-
// minimum non-legacy version number.
3279-
if (!private_->supports_legacy_wire_format) {
3276+
static const uint32_t kMinimumNonLegacyVersion = 13;
3277+
if (GetWireFormatVersion() < kMinimumNonLegacyVersion &&
3278+
!private_->supports_legacy_wire_format) {
32803279
isolate->Throw(*isolate->factory()->NewError(
32813280
i::MessageTemplate::kDataCloneDeserializationVersionError));
32823281
has_pending_exception = true;

0 commit comments

Comments
 (0)