Bug 1185056 - Use the normal CC macros for XPCWrappedNative. r=smaug

This commit is contained in:
Andrew McCreight 2015-07-17 14:14:00 +02:00
parent 23b2dd138f
commit e43fb0894e

View File

@ -39,18 +39,11 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(XPCWrappedNative)
// collected then its mFlatJSObject will be cycle collected too and
// finalization of the mFlatJSObject will unlink the JS objects (see
// XPC_WN_NoHelper_Finalize and FlatJSObjectFinalized).
NS_IMETHODIMP_(void)
NS_CYCLE_COLLECTION_CLASSNAME(XPCWrappedNative)::Unlink(void* p)
{
XPCWrappedNative* tmp = static_cast<XPCWrappedNative*>(p);
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(XPCWrappedNative)
tmp->ExpireWrapper();
}
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMETHODIMP
NS_CYCLE_COLLECTION_CLASSNAME(XPCWrappedNative)::Traverse
(void* p, nsCycleCollectionTraversalCallback& cb)
{
XPCWrappedNative* tmp = static_cast<XPCWrappedNative*>(p);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(XPCWrappedNative)
if (!tmp->IsValid())
return NS_OK;
@ -91,8 +84,7 @@ NS_CYCLE_COLLECTION_CLASSNAME(XPCWrappedNative)::Traverse
tmp->NoteTearoffs(cb);
return NS_OK;
}
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
void
XPCWrappedNative::Suspect(nsCycleCollectionNoteRootCallback& cb)