tor-browser

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

obj-ptrn-id-trailing-comma.js (933B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/dstr-binding/obj-ptrn-id-trailing-comma.case
      3 // - src/dstr-binding/default/try.template
      4 /*---
      5 description: Trailing comma is allowed following BindingPropertyList (try statement)
      6 esid: sec-runtime-semantics-catchclauseevaluation
      7 features: [destructuring-binding]
      8 flags: [generated]
      9 info: |
     10    Catch : catch ( CatchParameter ) Block
     11 
     12    [...]
     13    5. Let status be the result of performing BindingInitialization for
     14       CatchParameter passing thrownValue and catchEnv as arguments.
     15    [...]
     16 
     17    13.3.3 Destructuring Binding Patterns
     18 
     19    ObjectBindingPattern[Yield] :
     20        { }
     21        { BindingPropertyList[?Yield] }
     22        { BindingPropertyList[?Yield] , }
     23 ---*/
     24 
     25 var ranCatch = false;
     26 
     27 try {
     28  throw { x: 23 };
     29 } catch ({ x, }) {
     30  assert.sameValue(x, 23);
     31  ranCatch = true;
     32 }
     33 
     34 assert(ranCatch, 'executed `catch` block');
     35 
     36 reportCompare(0, 0);