tor-browser

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

name-super-prop-param.js (444B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: >
      6    The HomeObject of Functions declared as methods is the Object prototype.
      7 es6id: 14.3.8
      8 features: [super]
      9 ---*/
     10 
     11 var obj = {
     12  method(x = super.toString) {
     13    return x;
     14  }
     15 };
     16 
     17 obj.toString = null;
     18 
     19 assert.sameValue(obj.method(), Object.prototype.toString);
     20 
     21 reportCompare(0, 0);