Fix bug 56158

git-svn-id: svn://10.0.0.236/trunk@81024 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nboyd%atg.com
2000-10-12 14:59:19 +00:00
parent cc41c1b2c6
commit 0503a645d7
2 changed files with 20 additions and 0 deletions

View File

@@ -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";
}

View File

@@ -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";
}