tor-browser

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

super-property.js (567B)


      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-delete-operator-runtime-semantics-evaluation
      5 description: SuperReferences may not be deleted
      6 info: |
      7  [...]
      8  5.If IsPropertyReference(ref) is true, then
      9    a. If IsSuperReference(ref) is true, throw a ReferenceError exception.
     10 features: [class]
     11 ---*/
     12 
     13 class C extends Object {
     14  constructor() {
     15    super();
     16    delete super.x;
     17  }
     18 }
     19 
     20 assert.throws(ReferenceError, () => {
     21  new C();
     22 });
     23 
     24 reportCompare(0, 0);