Bug 811926 - Fix a pair of TRAVERSE that were using NoteNativeChild on nsISupports* - simplify goop with helper CC macros - r=smaug

This commit is contained in:
Benoit Jacob 2012-11-15 14:31:56 -05:00
parent a4ad87faa4
commit f1d2a6dcb0
2 changed files with 6 additions and 29 deletions

View File

@ -26,21 +26,9 @@ CallEvent::Create(TelephonyCall* aCall)
return event.forget();
}
NS_IMPL_CYCLE_COLLECTION_CLASS(CallEvent)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(CallEvent,
nsDOMEvent)
// NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_PTR(tmp->mCall->ToISupports(),
// TelephonyCall, "mCall")
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mCall");
cb.NoteNativeChild(tmp->mCall->ToISupports(), NS_CYCLE_COLLECTION_PARTICIPANT(TelephonyCall));
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(CallEvent,
nsDOMEvent)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCall)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(CallEvent,
nsDOMEvent,
mCall)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(CallEvent)
NS_INTERFACE_MAP_ENTRY(nsIDOMCallEvent)

View File

@ -140,20 +140,9 @@ TelephonyCall::NotifyError(const nsAString& aError)
}
}
NS_IMPL_CYCLE_COLLECTION_CLASS(TelephonyCall)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(TelephonyCall,
nsDOMEventTargetHelper)
// NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_PTR(tmp->mTelephony->ToISupports(),
// Telephony, "mTelephony")
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mTelephony");
cb.NoteNativeChild(tmp->mTelephony->ToISupports(), NS_CYCLE_COLLECTION_PARTICIPANT(Telephony));
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(TelephonyCall,
nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTelephony)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(TelephonyCall,
nsDOMEventTargetHelper,
mTelephony)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TelephonyCall)
NS_INTERFACE_MAP_ENTRY(nsIDOMTelephonyCall)