tor-browser

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

setter.js (414B)


      1 // Copyright (C) 2014 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 12.2.5
      5 description: >
      6    Computed property names for setters
      7 ---*/
      8 var calls = 0;
      9 class C {
     10  set ['a'](_) {
     11    calls++;
     12  }
     13 }
     14 new C().a = 'A';
     15 assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C().a = 'A';`");
     16 
     17 reportCompare(0, 0);