* Set prototype to Object.prototype for objects created by defineLibraryScope()
This commit is contained in:
parent
ea2d716210
commit
58540c9493
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue