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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user