Skip to content

Commit fcc58bf

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 83bf297 commit fcc58bf

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
@@ -3234,10 +3234,9 @@ Maybe<bool> ValueDeserializer::ReadHeader(Local<Context> context) {
32343234
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
32353235
DCHECK(read_header);
32363236

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

0 commit comments

Comments
 (0)