tor-browser

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

cptn-finally-wo-catch.js (936B)


      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 es6id: 13.15.8
      5 description: Completion value from `finally` clause of a try..finally statement
      6 info: |
      7    TryStatement : try Block Finally
      8 
      9    1. Let B be the result of evaluating Block.
     10    2. Let F be the result of evaluating Finally.
     11    3. If F.[[type]] is normal, let F be B.
     12    4. If F.[[type]] is return, or F.[[type]] is throw, return Completion(F).
     13    5. If F.[[value]] is not empty, return Completion(F).
     14    6. Return Completion{[[type]]: F.[[type]], [[value]]: undefined,
     15       [[target]]: F.[[target]]}.
     16 ---*/
     17 
     18 
     19 assert.sameValue(eval('1; try { } finally { }'), undefined);
     20 assert.sameValue(eval('2; try { 3; } finally { }'), 3);
     21 assert.sameValue(eval('4; try { } finally { 5; }'), undefined);
     22 assert.sameValue(eval('6; try { 7; } finally { 8; }'), 7);
     23 
     24 reportCompare(0, 0);