From 58540c9493b4b88d1c3605142cf5da7258321822 Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 22 Sep 2005 18:58:38 +0000 Subject: [PATCH] * Set prototype to Object.prototype for objects created by defineLibraryScope() --- src/helma/scripting/rhino/GlobalObject.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helma/scripting/rhino/GlobalObject.java b/src/helma/scripting/rhino/GlobalObject.java index 7930445c..ff398a1e 100644 --- a/src/helma/scripting/rhino/GlobalObject.java +++ b/src/helma/scripting/rhino/GlobalObject.java @@ -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);