js/src/tests/test262/ch13/13.2/S13.2.2_A19_T5.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * Function's scope chain is started when it is declared
     6  *
     7  * @path ch13/13.2/S13.2.2_A19_T5.js
     8  * @description Function is declared in the object scope, then an exception is thrown and the object is deleted
     9  */
    11 var a = 1;
    13 var __obj = {a:2};
    15 with (__obj)
    16 {
    17     try {
    19     	var __func = function()
    20         {
    21             return a;
    22         }
    23         throw 3;
    24     } catch (e) {
    25     	;
    26     }
    27 }
    29 delete __obj;
    31 result = __func();
    33 //////////////////////////////////////////////////////////////////////////////
    34 //CHECK#1
    35 if (result !== 2) {
    36 	$ERROR('#1: result === 2. Actual: result ==='+result);
    37 }
    38 //
    39 //////////////////////////////////////////////////////////////////////////////

mercurial