Fix bug 56158
git-svn-id: svn://10.0.0.236/trunk@81024 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -47,6 +47,16 @@ public class NativeError extends ScriptableObject {
|
||||
public NativeError() {
|
||||
}
|
||||
|
||||
public static Object jsConstructor(Context cx, Object[] args,
|
||||
Function funObj, boolean inNewExpr)
|
||||
{
|
||||
NativeError result = new NativeError();
|
||||
if (args.length >= 1)
|
||||
result.put("message", result, cx.toString(args[0]));
|
||||
result.setPrototype(getClassPrototype(funObj, "Error"));
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return "Error";
|
||||
}
|
||||
|
||||
@@ -47,6 +47,16 @@ public class NativeError extends ScriptableObject {
|
||||
public NativeError() {
|
||||
}
|
||||
|
||||
public static Object jsConstructor(Context cx, Object[] args,
|
||||
Function funObj, boolean inNewExpr)
|
||||
{
|
||||
NativeError result = new NativeError();
|
||||
if (args.length >= 1)
|
||||
result.put("message", result, cx.toString(args[0]));
|
||||
result.setPrototype(getClassPrototype(funObj, "Error"));
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return "Error";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user