tor-browser

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

S13.2.1_A7_T2.js (867B)


      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    When the [[Call]] property for a Function object F is called, the following steps are taken:
      7    2. Evaluate F's FunctionBody;
      8    if Result.type is returned  then Result.value is returned too
      9 es5id: 13.2.1_A7_T2
     10 description: >
     11    Returning null. Declaring a function with "var __func = function
     12    ()"
     13 ---*/
     14 
     15 var __func = function (){
     16    var x = null;
     17    return x;
     18 }
     19 
     20 //////////////////////////////////////////////////////////////////////////////
     21 //CHECK#1
     22 try{
     23    var x=__func();
     24 } catch(e){
     25    throw new Test262Error('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e);
     26 }
     27 //
     28 //////////////////////////////////////////////////////////////////////////////
     29 
     30 reportCompare(0, 0);