deps: V8: cherry-pick c721203
Original commit message:
Add missing null condition in Proxy GetPrototypeof
Bug: v8:9781
Change-Id: I1f82a828f103cc2aa3f9553214f6b4867ffc3b17
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1829897
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64049}
Refs: c721203615
Fixes: https://github.com/nodejs/node/issues/29730
PR-URL: https://github.com/nodejs/node/pull/30065
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
This commit is contained in:
parent
71bcd05232
commit
08448d9bef
@ -39,7 +39,7 @@
|
||||
|
||||
# Reset this number to 0 on major V8 upgrades.
|
||||
# Increment by one for each non-official patch applied to deps/v8.
|
||||
'v8_embedder_string': '-node.15',
|
||||
'v8_embedder_string': '-node.16',
|
||||
|
||||
##### V8 defaults for Node.js #####
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace proxy {
|
||||
|
||||
// 8. If Type(handlerProto) is neither Object nor Null, throw a TypeError
|
||||
// exception.
|
||||
if (!Is<JSReceiver>(handlerProto)) {
|
||||
if (!Is<JSReceiver>(handlerProto) && handlerProto != Null) {
|
||||
goto ThrowProxyGetPrototypeOfInvalid;
|
||||
}
|
||||
|
||||
|
11
deps/v8/test/mjsunit/regress/regress-9781.js
vendored
Normal file
11
deps/v8/test/mjsunit/regress/regress-9781.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2019 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
var proto = Object.getPrototypeOf(new Proxy(Object.create(null), {
|
||||
getPrototypeOf(target) {
|
||||
return Reflect.getPrototypeOf(target);
|
||||
}
|
||||
} ));
|
||||
|
||||
assertEquals(proto, null);
|
Loading…
x
Reference in New Issue
Block a user