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 { } else {
bool isSystem; bool isSystem;
{ {
JSAutoEnterCompartment ac; JSAutoCompartment ac(cx, obj);
if (!ac.enter(cx, obj))
return nullptr;
JSObject *globalObj = JS_GetGlobalForObject(cx, obj); JSObject *globalObj = JS_GetGlobalForObject(cx, obj);
JS_ASSERT(globalObj); JS_ASSERT(globalObj);
isSystem = JS_IsSystemObject(cx, globalObj); isSystem = JS_IsSystemObject(cx, globalObj);