* Set prototype to Object.prototype for objects created by defineLibraryScope()

This commit is contained in:
hns 2005-09-22 18:58:38 +00:00
parent ea2d716210
commit 58540c9493

View file

@ -387,11 +387,12 @@ public class GlobalObject extends ImporterTopLevel implements PropertyRecorder {
put(name, this, obj); put(name, this, obj);
return; return;
} }
ScriptableObject scope = new ScriptableObject() { ScriptableObject scope = new NativeObject() {
public String getClassName() { public String getClassName() {
return name; return name;
} }
}; };
scope.setPrototype(ScriptableObject.getObjectPrototype(this));
if (initStandardObjects) { if (initStandardObjects) {
Context cx = Context.getCurrentContext(); Context cx = Context.getCurrentContext();
cx.initStandardObjects(scope, false); cx.initStandardObjects(scope, false);