Bug 921454 - Invert faulty assertion. r=jonco
This assertion is pretty clearly bogus, and only exists because, as it turns
out, we never had any test coverage for transplanting SCSW objects with
waivers. Even in the world when this stuff landed (
bug 773962, which was well
before the removal of Location SCSWs in
bug 808608 and the conversion of Nodes
to new bindings), we apparently never tested the waiver path. :-(
--- a/js/xpconnect/wrappers/WrapperFactory.cpp
+++ b/js/xpconnect/wrappers/WrapperFactory.cpp
@@ -675,17 +675,17 @@ TransplantObjectWithWrapper(JSContext *c
RootedObject oldWaiver(cx, WrapperFactory::GetXrayWaiver(origobj));
RootedObject newSameCompartmentWrapper(cx,
js_TransplantObjectWithWrapper(cx, origobj, origwrapper, targetobj,
targetwrapper));
if (!newSameCompartmentWrapper || !oldWaiver)
return newSameCompartmentWrapper;
RootedObject newIdentity(cx, Wrapper::wrappedObject(newSameCompartmentWrapper));
- MOZ_ASSERT(js::IsWrapper(newIdentity));
+ MOZ_ASSERT(!js::IsWrapper(newIdentity));
if (!FixWaiverAfterTransplant(cx, oldWaiver, newIdentity))
return NULL;
return newSameCompartmentWrapper;
}
nsIGlobalObject *
GetNativeForGlobal(JSObject *obj)
{