tor-browser

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

instance-extensible.js (1397B)


      1 // |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) -- 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 /*---
      6 esid: sec-disposablestack
      7 description: Instances of DisposableStack are extensible
      8 info: |
      9  DisposableStack( )
     10 
     11  ...
     12  2. Let disposableStack be ? OrdinaryCreateFromConstructor(NewTarget, "%DisposableStack.prototype%", « [[DisposableState]], [[DisposeCapability]] »).
     13  3. Set disposableStack.[[DisposableState]] to pending.
     14  4. Set disposableStack.[[DisposeCapability]] to NewDisposeCapability().
     15  5. Return disposableStack.
     16 
     17  OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )
     18 
     19  ...
     20  2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto).
     21  3. Return ObjectCreate(proto, internalSlotsList).
     22 
     23  ObjectCreate ( proto [ , internalSlotsList ] )
     24 
     25  4. Set obj.[[Prototype]] to proto.
     26  5. Set obj.[[Extensible]] to true.
     27  6. Return obj.
     28 features: [explicit-resource-management, Reflect]
     29 ---*/
     30 
     31 var stack = new DisposableStack();
     32 assert.sameValue(Object.isExtensible(stack), true);
     33 
     34 reportCompare(0, 0);