diff --git a/content/xbl/src/nsXBLDocumentInfo.cpp b/content/xbl/src/nsXBLDocumentInfo.cpp index ae0aff7136b..f7a1fc2bbc0 100644 --- a/content/xbl/src/nsXBLDocumentInfo.cpp +++ b/content/xbl/src/nsXBLDocumentInfo.cpp @@ -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