Bug 902718 - Defer XPCOM release from the XBL compilation scope finalizer. r=mccr8

Apparently the current setup is incidentally safe, but far from kosher.
This commit is contained in:
Bobby Holley 2013-08-09 09:25:12 -07:00
parent b5f8a2c970
commit 3f88a39464

View File

@ -159,8 +159,9 @@ nsXBLDocGlobalObject_finalize(JSFreeOp *fop, JSObject *obj)
if (sgo)
sgo->OnFinalize(obj);
// The addref was part of JSObject construction
NS_RELEASE(nativeThis);
// The addref was part of JSObject construction. Note that this effectively
// just calls release later on.
nsContentUtils::DeferredFinalize(nativeThis);
}
static bool