blob: 8024348499195679b34259989cc0c9a8ab0b4351 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* The scope chain is initialised to contain the same objects,
* in the same order, as the calling context's scope chain
*
* @path ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js
* @description eval within global execution context
*/
function f(){
var i;
var j;
str1 = '';
str2 = '';
var x = 1;
for(i in this){
str1+=i;
}
eval('for(j in this){\nstr2+=j;\n}');
return (str1 === str2);
var y = 2;
}
if(!f()){
$ERROR("#1: scope chain must contain same objects in the same order as the calling context");
}
|