tor-browser

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

prop-expr-obj-err.js (704B)


      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-super-keyword
      5 es6id: 12.3.5
      6 description: Abrupt completion from Expression evaluation
      7 info: |
      8  1. Let propertyNameReference be the result of evaluating Expression.
      9  2. Let propertyNameValue be ? GetValue(propertyNameReference).
     10 
     11  6.2.3.1 GetValue
     12 
     13  1. ReturnIfAbrupt(V).
     14 ---*/
     15 
     16 var thrown = new Test262Error();
     17 var caught;
     18 function thrower() {
     19  throw thrown;
     20 }
     21 var obj = {
     22  method() {
     23    try {
     24      super[thrower()];
     25    } catch (err) {
     26      caught = err;
     27    }
     28  }
     29 };
     30 
     31 obj.method();
     32 
     33 assert.sameValue(caught, thrown);
     34 
     35 reportCompare(0, 0);