tor-browser

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

S11.8.6_A6_T1.js (773B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    Only Function objects implement [[HasInstance]] and can be proper
      7    ShiftExpression for the "instanceof" operator consequently
      8 es5id: 11.8.6_A6_T1
      9 description: Checking "this" case
     10 ---*/
     11 
     12 //CHECK#1
     13 try{
     14 ({}) instanceof this;
     15 throw new Test262Error('#1: Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');
     16 }
     17 catch(e){
     18  if (e instanceof TypeError !== true) {
     19    throw new Test262Error('#1: Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');
     20  }
     21 }
     22 
     23 reportCompare(0, 0);