Skip to content

Commit

Permalink
deps: V8: cherry-pick c721203
Browse files Browse the repository at this point in the history
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 <[email protected]>
    Reviewed-by: Georg Neis <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#64049}

Refs: v8/v8@c721203
Fixes: #29730

PR-URL: #30065
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
  • Loading branch information
targos committed Oct 28, 2019
1 parent edfbee3 commit 1cfa98c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/builtins/proxy-get-prototype-of.tq
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
11 changes: 11 additions & 0 deletions deps/v8/test/mjsunit/regress/regress-9781.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 1cfa98c

Please sign in to comment.