Wed, 31 Dec 2014 06:09:35 +0100
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 * VariableDeclaration within Eval statement is initialized as the program reaches the eval statement
6 *
7 * @path ch12/12.2/S12.2_A5.js
8 * @description Executing eval("var x")
9 */
11 //////////////////////////////////////////////////////////////////////////////
12 //CHECK#1
13 try{
14 x=x;
15 $ERROR('#1: "x=x" lead to throwing exception');
16 }catch(e){
17 $PRINT(e.message);
18 };
19 //
20 //////////////////////////////////////////////////////////////////////////////
22 eval("var x");
24 //////////////////////////////////////////////////////////////////////////////
25 //CHECK#2
26 try{
27 x=x;
28 }catch(e){
29 $ERROR('#2: VariableDeclaration inside Eval statement is initialized when program reaches the eval statement '+e.message);
30 };
31 //
32 //////////////////////////////////////////////////////////////////////////////