In NativeJavaClass.constructSpecific use passed scope, not function pointer as scope source so shared system scope with custom top scope and custom wrap factory would work.

git-svn-id: svn://10.0.0.236/trunk@148780 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
igor%mir2.org
2003-11-03 18:06:49 +00:00
parent b1fef85354
commit d704d3894e
2 changed files with 4 additions and 5 deletions

View File

@@ -181,7 +181,7 @@ public class NativeJavaClass extends NativeJavaObject implements Function {
}
// Found the constructor, so try invoking it.
return constructSpecific(cx, scope, this, args, ctors[index]);
return constructSpecific(cx, scope, args, ctors[index]);
} else {
Scriptable topLevel = ScriptableObject.getTopLevelScope(this);
String msg = "";
@@ -208,11 +208,10 @@ public class NativeJavaClass extends NativeJavaObject implements Function {
}
static Scriptable constructSpecific(Context cx, Scriptable scope,
Scriptable thisObj, Object[] args,
MemberBox ctor)
Object[] args, MemberBox ctor)
throws JavaScriptException
{
Scriptable topLevel = ScriptableObject.getTopLevelScope(thisObj);
Scriptable topLevel = ScriptableObject.getTopLevelScope(scope);
Class classObject = ctor.getDeclaringClass();
Class[] argTypes = ctor.argTypes;

View File

@@ -67,7 +67,7 @@ public class NativeJavaConstructor extends BaseFunction
Object[] args)
throws JavaScriptException
{
return NativeJavaClass.constructSpecific(cx, scope, this, args, ctor);
return NativeJavaClass.constructSpecific(cx, scope, args, ctor);
}
public String toString()