From 1d133ec6babc8e591d27de4d126e9b6ba6345518 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 9 Apr 2009 13:07:27 -0700 Subject: [PATCH] Bug 469237: Assert that we never add properties to lexical blocks. r=igor --- js/src/jsobj.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 3ff79e6c741..e505408557f 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -4487,6 +4487,9 @@ js_SetPropertyHelper(JSContext *cx, JSObject *obj, jsid id, jsval *vp, } 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. * Do this early, before locking obj to avoid nesting locks.