summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/envChain.jsm
blob: c60b032fcc0df01364c58726c0b39dbf3508cb6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var qualified = 10;
// NOTE: JSM cannot have unqualified name.
let lexical = 30;
this.prop = 40;

const funcs = Cu.getJSTestingFunctions();
const envs = [];
let env = funcs.getInnerMostEnvironmentObject();
while (env) {
  envs.push({
    type: funcs.getEnvironmentObjectType(env) || "*BackstagePass*",
    qualified: !!Object.getOwnPropertyDescriptor(env, "qualified"),
    prop: !!Object.getOwnPropertyDescriptor(env, "prop"),
    lexical: !!Object.getOwnPropertyDescriptor(env, "lexical"),
  });

  env = funcs.getEnclosingEnvironmentObject(env);
}

const EXPORTED_SYMBOLS = ["envs"];