mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
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: https://github.com/nodejs/node/pull/11752 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This commit is contained in:
parent
0f3e69db41
commit
6690415696
7
deps/v8/src/api.cc
vendored
7
deps/v8/src/api.cc
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user