Commit c7212036 authored by Z Nguyen-Huu's avatar Z Nguyen-Huu Committed by Commit Bot

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: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64049}
parent 9efe315e
......@@ -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;
}
......
// 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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment