diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp index af08c43916e..c38d0a3f958 100644 --- a/js/src/jsinterp.cpp +++ b/js/src/jsinterp.cpp @@ -5391,7 +5391,7 @@ BEGIN_CASE(JSOP_DEFFUN) * setter to an existing property without a getter or setter. */ JS_ASSERT(!(attrs & ~(JSPROP_ENUMERATE|JSPROP_PERMANENT))); - JS_ASSERT(!(old & JSPROP_READONLY)); + JS_ASSERT_IF(attrs != JSPROP_ENUMERATE, !(old & JSPROP_READONLY)); doSet = true; } pobj->dropProperty(cx, prop); diff --git a/js/src/methodjit/StubCalls.cpp b/js/src/methodjit/StubCalls.cpp index 0f4e399b7fd..508c2f35dc5 100644 --- a/js/src/methodjit/StubCalls.cpp +++ b/js/src/methodjit/StubCalls.cpp @@ -954,7 +954,7 @@ stubs::DefFun(VMFrame &f, JSFunction *fun) * setter to an existing property without a getter or setter. */ JS_ASSERT(!(attrs & ~(JSPROP_ENUMERATE|JSPROP_PERMANENT))); - JS_ASSERT(!(old & JSPROP_READONLY)); + JS_ASSERT_IF(attrs != JSPROP_ENUMERATE, !(old & JSPROP_READONLY)); doSet = true; } pobj->dropProperty(cx, prop);