Make sure the array returned by HopObject.list() has its prototype set properly.

This commit is contained in:
hns 2003-09-04 20:03:41 +00:00
parent 76a07955d3
commit 6d7a8eba66

View file

@ -341,7 +341,7 @@ public class HopObject extends ScriptableObject implements Wrapper {
* *
* @return ... * @return ...
*/ */
public NativeArray jsFunction_list() { public Scriptable jsFunction_list() {
Enumeration e = node.getSubnodes(); Enumeration e = node.getSubnodes();
ArrayList a = new ArrayList(); ArrayList a = new ArrayList();
@ -349,7 +349,7 @@ public class HopObject extends ScriptableObject implements Wrapper {
a.add(e.nextElement()); a.add(e.nextElement());
} }
return new NativeArray(a.toArray()); return Context.getCurrentContext().newArray(core.global, a.toArray());
} }
/** /**