tor-browser

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

S15.3.5.3_A2_T2.js (909B)


      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    Assume F is a Function object. When the [[HasInstance]] method of F is called with value V and V is an object, the following steps are taken:
      7    i) Call the [[Get]] method of F with property name "prototype".
      8    ii) Let O be Result(i).
      9    iii) O is not an object, throw a TypeError exception
     10 es5id: 15.3.5.3_A2_T2
     11 description: F.prototype is undefined, and V is empty object
     12 ---*/
     13 
     14 var FACTORY;
     15 FACTORY = new Function;
     16 
     17 FACTORY.prototype = undefined;
     18 
     19 var obj;
     20 obj={};
     21 
     22 //CHECK#1
     23 try {
     24  obj instanceof  FACTORY;
     25  throw new Test262Error('#1: O is not an object, throw a TypeError exception');
     26 } catch (e) {
     27  if (!(e instanceof TypeError)) {
     28  	throw new Test262Error('#1.1: O is not an object, throw a TypeError exception');
     29  }
     30 }
     31 
     32 reportCompare(0, 0);