diff --git a/src/helma/scripting/rhino/GlobalObject.java b/src/helma/scripting/rhino/GlobalObject.java index 4c80ce58..58b104bd 100644 --- a/src/helma/scripting/rhino/GlobalObject.java +++ b/src/helma/scripting/rhino/GlobalObject.java @@ -73,7 +73,7 @@ public class GlobalObject extends ImporterTopLevel implements PropertyRecorder { "encodeXml", "encodeForm", "stripTags", "formatParagraphs", "getXmlDocument", "getHtmlDocument", "seal", "getDBConnection", "getURL", "write", "writeln", - "serialize", "deserialize", "defineLibraryScope", + "serialize", "deserialize", "wrapJavaMap", "unwrapJavaMap", "toJava" }; @@ -367,35 +367,6 @@ public class GlobalObject extends ImporterTopLevel implements PropertyRecorder { return null; } - /** - * Creates a global object, optionally initializing it with standard - * JavaScript objects. This can be used for script libraries that want - * to extend standard JavaScript functionality, but leave the original - * prototypes alone. - * - * @param name the name of the new scope - */ - public void defineLibraryScope(final String name, boolean initStandardObjects) { - Object obj = get(name, this); - if (obj != NOT_FOUND) { - // put the property again to fool PropertyRecorder - // into believing it has been renewed - put(name, this, obj); - return; - } - ScriptableObject scope = new NativeObject() { - public String getClassName() { - return name; - } - }; - scope.setPrototype(ScriptableObject.getObjectPrototype(this)); - if (initStandardObjects) { - Context cx = Context.getCurrentContext(); - cx.initStandardObjects(scope, false); - } - put(name, this, scope); - } - /** * Wrap a java.util.Map so that it looks and behaves like a native JS object * @param obj a map