From a3b21be21d129713f8c0a67efa68e81226fef944 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Mon, 10 Dec 2007 16:15:01 +0000 Subject: [PATCH] Bug 376957 followup fix: make Error readonly/permanent, patch by Brendan Eich , r=jwalden, a=schrep for M10 landing git-svn-id: svn://10.0.0.236/trunk@240727 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/src/jsexn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/js/src/jsexn.c b/mozilla/js/src/jsexn.c index 8191e6ebd01..1d13f18be76 100644 --- a/mozilla/js/src/jsexn.c +++ b/mozilla/js/src/jsexn.c @@ -1052,7 +1052,8 @@ js_InitExceptionClasses(JSContext *cx, JSObject *obj) /* Make a constructor function for the current name. */ atom = cx->runtime->atomState.classAtoms[exceptions[i].key]; - fun = js_DefineFunction(cx, obj, atom, exceptions[i].native, 3, 0); + fun = js_DefineFunction(cx, obj, atom, exceptions[i].native, 3, + JSPROP_READONLY | JSPROP_PERMANENT); if (!fun) break;