Fix backout to account for infallible-JSAutoCompartment change on a CLOSED TREE (no bug, r=bustage)

This commit is contained in:
Luke Wagner 2012-08-23 22:12:21 -07:00
parent 424ea88da6
commit c3caa3a90c

View File

@ -331,9 +331,7 @@ WrapperFactory::Rewrap(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSO
} else {
bool isSystem;
{
JSAutoEnterCompartment ac;
if (!ac.enter(cx, obj))
return nullptr;
JSAutoCompartment ac(cx, obj);
JSObject *globalObj = JS_GetGlobalForObject(cx, obj);
JS_ASSERT(globalObj);
isSystem = JS_IsSystemObject(cx, globalObj);