tor-browser

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

head-await-using-bound-names-fordecl-tdz.js (818B)


      1 // |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) async -- explicit-resource-management is not enabled unconditionally, requires shell-options
      2 // Copyright (C) 2023 Ron Buckton. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-for-in-and-for-of-statements
      6 description: >
      7    ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of)
      8 flags: [async]
      9 includes: [asyncHelpers.js]
     10 features: [explicit-resource-management]
     11 ---*/
     12 
     13 asyncTest(async function () {
     14  await assert.throwsAsync(ReferenceError, async function() {
     15    let x = { async [Symbol.asyncDispose]() { } };
     16    for (await using x of [x]) {}
     17  });
     18 });