Bug 469237: Assert that we never add properties to lexical blocks. r=igor

This commit is contained in:
Jim Blandy 2009-04-09 13:07:27 -07:00
parent b9323a1394
commit 1d133ec6ba

View File

@ -4487,6 +4487,9 @@ js_SetPropertyHelper(JSContext *cx, JSObject *obj, jsid id, jsval *vp,
} }
if (!sprop) { if (!sprop) {
/* We should never add properties to lexical blocks. */
JS_ASSERT(OBJ_GET_CLASS(cx, obj) != &js_BlockClass);
/* /*
* Purge the property cache of now-shadowed id in obj's scope chain. * Purge the property cache of now-shadowed id in obj's scope chain.
* Do this early, before locking obj to avoid nesting locks. * Do this early, before locking obj to avoid nesting locks.