Protect more properties on catch variables. bug 338709, r=brendan

git-svn-id: svn://10.0.0.236/trunk@199061 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2006-06-05 21:07:22 +00:00
parent 33fcfaf336
commit eed105f2b9

View File

@@ -5465,7 +5465,8 @@ interrupt:
ok = OBJ_GET_ATTRIBUTES(cx, obj, id, NULL, &attrs);
if (!ok)
goto out;
if (!(attrs & JSPROP_READONLY)) {
if (!(attrs & (JSPROP_READONLY | JSPROP_PERMANENT |
JSPROP_GETTER | JSPROP_SETTER))) {
/* Define obj[id] to contain rval and to be permanent. */
ok = OBJ_DEFINE_PROPERTY(cx, obj, id, rval, NULL, NULL,
JSPROP_PERMANENT, NULL);