From 0503a645d70a9ba14a53cd6f77fe2085c85f82db Mon Sep 17 00:00:00 2001 From: "nboyd%atg.com" Date: Thu, 12 Oct 2000 14:59:19 +0000 Subject: [PATCH] Fix bug 56158 git-svn-id: svn://10.0.0.236/trunk@81024 18797224-902f-48f8-a5cc-f745e15eee43 --- .../js/rhino/org/mozilla/javascript/NativeError.java | 10 ++++++++++ .../rhino/src/org/mozilla/javascript/NativeError.java | 10 ++++++++++ 2 files changed, 20 insertions(+) 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"; }