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

« back to all changes in this revision

Viewing changes to js/src/jit-test/tests/debug/Environment-names-01.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
// env.names() lists nonenumerable names in with-statement environments.
 
2
 
 
3
var g = newGlobal('new-compartment');
 
4
var dbg = Debugger(g);
 
5
var hits = 0;
 
6
g.h = function () {
 
7
    var env = dbg.getNewestFrame().environment;
 
8
    var names = env.names();
 
9
    assertEq(names.indexOf("a") !== -1, true);
 
10
 
 
11
    // FIXME: Bug 748592 - proxies don't correctly propagate JSITER_HIDDEN
 
12
    //assertEq(names.indexOf("b") !== -1, true);
 
13
    //assertEq(names.indexOf("isPrototypeOf") !== -1, true);
 
14
    hits++;
 
15
};
 
16
g.eval("var obj = {a: 1};\n" +
 
17
       "Object.defineProperty(obj, 'b', {value: 2});\n" +
 
18
       "with (obj) h();");
 
19
assertEq(hits, 1);