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 * Calling a function as a constructor is inadmissible as long as this.any_Function is declared by eval and called
6 *
7 * @path ch13/13.2/S13.2.2_A13.js
8 * @description Calling a function as a constructor after it has been declared by eval
9 */
11 function FACTORY(){
12 this.id = 0;
14 this.id = func();
16 eval("function func(){return \"id_string\";}");
18 }
19 //////////////////////////////////////////////////////////////////////////////
20 //CHECK#1
21 try {
22 var obj = new FACTORY();
23 $ERROR('#1: var obj = new FACTORY() lead to throwing exception');
24 } catch (e) {
25 if (e instanceof Test262Error) throw e;
26 }
27 //
28 //////////////////////////////////////////////////////////////////////////////