tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

__proto__-value-null.js (778B)


      1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-__proto__-property-names-in-object-initializers
      5 es6id: B.3.1
      6 description: >
      7  The value of the `__proto__` property key is assigned to the [[Prototype]]
      8  internal slot (null value)
      9 info: |
     10  ...
     11  6. If propKey is the String value "__proto__" and if
     12     IsComputedPropertyKey(propKey) is false, then
     13     a. If Type(propValue) is either Object or Null, then
     14        i. Return object.[[SetPrototypeOf]](propValue).
     15 ---*/
     16 
     17 var object = {
     18  __proto__: null
     19 };
     20 
     21 assert.sameValue(Object.getPrototypeOf(object), null);
     22 assert.sameValue(
     23  Object.getOwnPropertyDescriptor(object, '__proto__'), undefined
     24 );
     25 
     26 reportCompare(0, 0);