tor-browser

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

instance-name.js (828B)


      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: 25.2.1.1
      6 description: Assignment of function `name` attribute
      7 info: |
      8    [...]
      9    3. Return CreateDynamicFunction(C, NewTarget, "generator", args).
     10 
     11    ES6 19.2.1.1.1
     12        RuntimeSemantics: CreateDynamicFunction(constructor, newTarget, kind, args)
     13 
     14    [...]
     15    29. Perform SetFunctionName(F, "anonymous").
     16 includes: [propertyHelper.js]
     17 features: [generators]
     18 ---*/
     19 
     20 var GeneratorFunction = Object.getPrototypeOf(function*() {}).constructor;
     21 
     22 assert.sameValue(GeneratorFunction().name, 'anonymous');
     23 verifyNotEnumerable(GeneratorFunction(), 'name');
     24 verifyNotWritable(GeneratorFunction(), 'name');
     25 verifyConfigurable(GeneratorFunction(), 'name');
     26 
     27 reportCompare(0, 0);