~ubuntu-branches/ubuntu/vivid/mozjs24/vivid

« back to all changes in this revision

Viewing changes to js/src/jit-test/tests/for-of/arguments-4.js

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-02-11 21:55:34 UTC
  • Revision ID: package-import@ubuntu.com-20140211215534-m1zyq5aj59md3y07
Tags: upstream-24.2.0
ImportĀ upstreamĀ versionĀ 24.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// for-of can iterate arguments objects for other active frames.
 
2
 
 
3
Object.prototype.iterator = Array.prototype.iterator;
 
4
 
 
5
var s;
 
6
function g(obj) {
 
7
    for (var v of obj)
 
8
        s += v;
 
9
}
 
10
 
 
11
function f() {
 
12
    g(arguments);
 
13
}
 
14
 
 
15
s = '';
 
16
f(1, 2, 3);
 
17
assertEq(s, '123');