Bug 1068589 - Remove forced extensible check before calling JSObject::preventExtensions. r=jwalden

This commit is contained in:
André Bargull
2014-09-23 22:47:01 +02:00
parent 29ab0e3875
commit ea42fa74b9
9 changed files with 89 additions and 31 deletions

View File

@@ -1267,10 +1267,7 @@ JSObject::sealOrFreeze(JSContext *cx, HandleObject obj, ImmutabilityType it)
assertSameCompartment(cx, obj);
JS_ASSERT(it == SEAL || it == FREEZE);
bool extensible;
if (!JSObject::isExtensible(cx, obj, &extensible))
return false;
if (extensible && !JSObject::preventExtensions(cx, obj))
if (!JSObject::preventExtensions(cx, obj))
return false;
AutoIdVector props(cx);