tor-browser

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

fn-name-cover.js (865B)


      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 es6id: 13.3.2.4
      6 description: >
      7    Assignment of function `name` attribute (CoverParenthesizedExpression)
      8 info: |
      9    VariableDeclaration : BindingIdentifier Initializer
     10 
     11    [...]
     12    7. If IsAnonymousFunctionDefinition(Initializer) is true, then
     13       a. Let hasNameProperty be HasOwnProperty(value, "name").
     14       b. ReturnIfAbrupt(hasNameProperty).
     15       c. If hasNameProperty is false, perform SetFunctionName(value,
     16          bindingId).
     17 includes: [propertyHelper.js]
     18 ---*/
     19 
     20 var xCover = (0, function() {});
     21 var cover = (function() {});
     22 
     23 assert(xCover.name !== 'xCover');
     24 
     25 verifyProperty(cover, 'name', {
     26  value: 'cover',
     27  writable: false,
     28  enumerable: false,
     29  configurable: true,
     30 });
     31 
     32 reportCompare(0, 0);