Don't override a prototype property iff it is JSPROP_SHARED (not also if it's a JSPROP_SETTER; 197940, r=rogerl).

git-svn-id: svn://10.0.0.236/trunk@139739 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brendan%mozilla.org 2003-03-19 02:25:39 +00:00
parent c45f22dc59
commit 7d9dc98de7

View File

@ -2620,8 +2620,8 @@ js_SetProperty(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
}
if (pobj != obj) {
/* Don't clone a setter or shared prototype property. */
if (attrs & (JSPROP_SETTER | JSPROP_SHARED)) {
/* Don't clone a shared prototype property. */
if (attrs & JSPROP_SHARED) {
JS_UNLOCK_SCOPE(cx, scope);
return SPROP_SET(cx, sprop, obj, pobj, vp);