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 5e47d4412f
commit 63a0cd67e4

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);