tor-browser

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

S10.6_A2.js (998B)


      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    The value of the internal [[Prototype]] property of the
      7    created arguments object is the original Object prototype object, the one
      8    that is the initial value of Object.prototype
      9 es5id: 10.6_A2
     10 description: Checking arguments.constructor.prototype===Object.prototype
     11 ---*/
     12 
     13 //CHECK#1
     14 function f1(){
     15  return arguments.constructor.prototype;
     16 }
     17 try{
     18  if(f1() !== Object.prototype){
     19    throw new Test262Error('#1: arguments.constructor.prototype === Object.prototype');
     20  }
     21 }
     22 catch(e){
     23  throw new Test262Error("#1: arguments doesn't exists");
     24 }
     25 
     26 //CHECK#2
     27 var f2 = function(){return arguments.constructor.prototype;};
     28 try{
     29  if(f2() !== Object.prototype){
     30    throw new Test262Error('#2: arguments.constructor.prototype === Object.prototype');
     31  }
     32 }
     33 catch(e){
     34  throw new Test262Error("#2: arguments doesn't exists");
     35 }
     36 
     37 reportCompare(0, 0);