Don't forget to drop property in getter/setter case (34069, r=jband,a=leaf).

This commit is contained in:
brendan%mozilla.org 2000-04-01 04:23:04 +00:00
parent 908043d11a
commit 6fd7f42463

View File

@ -1640,6 +1640,11 @@ js_DefineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
JS_UNLOCK_OBJ(cx, obj);
return JS_TRUE;
}
if (sprop) {
/* NB: call OBJ_DROP_PROPERTY, as pobj might not be native. */
OBJ_DROP_PROPERTY(cx, pobj, (JSProperty *)sprop);
}
}
#endif /* JS_HAS_GETTER_SETTER */