* 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);
|
||||
return;
|
||||
}
|
||||
ScriptableObject scope = new ScriptableObject() {
|
||||
ScriptableObject scope = new NativeObject() {
|
||||
public String getClassName() {
|
||||
return name;
|
||||
}
|
||||
};
|
||||
scope.setPrototype(ScriptableObject.getObjectPrototype(this));
|
||||
if (initStandardObjects) {
|
||||
Context cx = Context.getCurrentContext();
|
||||
cx.initStandardObjects(scope, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue