diff --git a/mozilla/js/rhino/org/mozilla/javascript/NativeError.java b/mozilla/js/rhino/org/mozilla/javascript/NativeError.java index 998214e81bf..ff987d58720 100644 --- a/mozilla/js/rhino/org/mozilla/javascript/NativeError.java +++ b/mozilla/js/rhino/org/mozilla/javascript/NativeError.java @@ -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"; } diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/NativeError.java b/mozilla/js/rhino/src/org/mozilla/javascript/NativeError.java index 998214e81bf..ff987d58720 100644 --- a/mozilla/js/rhino/src/org/mozilla/javascript/NativeError.java +++ b/mozilla/js/rhino/src/org/mozilla/javascript/NativeError.java @@ -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"; }