Use core.getScope() rather than using core.global directly.

This commit is contained in:
hns 2004-01-20 17:52:20 +00:00
parent df57e51235
commit 8236ff3e18

View file

@ -40,7 +40,7 @@ public class PathWrapper extends ScriptableObject {
// initialize properties and functions // initialize properties and functions
int attributes = DONTENUM | READONLY | PERMANENT; int attributes = DONTENUM | READONLY | PERMANENT;
setParentScope(core.global); setParentScope(core.getScope());
setPrototype(null); setPrototype(null);
defineProperty("length", PathWrapper.class, attributes); defineProperty("length", PathWrapper.class, attributes);
defineFunctionProperties(new String[] {"href"}, PathWrapper.class, attributes); defineFunctionProperties(new String[] {"href"}, PathWrapper.class, attributes);
@ -62,7 +62,7 @@ public class PathWrapper extends ScriptableObject {
Object obj = path.getByPrototypeName(name); Object obj = path.getByPrototypeName(name);
if (obj != null) { if (obj != null) {
return Context.toObject(obj, core.global); return Context.toObject(obj, core.getScope());
} }
return super.get(name, start); return super.get(name, start);
@ -75,7 +75,7 @@ public class PathWrapper extends ScriptableObject {
Object obj = path.get(idx); Object obj = path.get(idx);
if (obj != null) { if (obj != null) {
return Context.toObject(obj, core.global); return Context.toObject(obj, core.getScope());
} }
return null; return null;