Bug 1035654 - Part 2: Add ImplCycleCollectionTraverse for OwningNonNull<T>. r=bzbarsky

This commit is contained in:
Szu-Yu Chen [:aknow] 2014-08-01 03:19:00 -04:00
parent 8d4867b15f
commit d06fa6411d

View File

@ -10,6 +10,7 @@
#define mozilla_dom_OwningNonNull_h
#include "nsAutoPtr.h"
#include "nsCycleCollectionNoteChild.h"
namespace mozilla {
namespace dom {
@ -87,6 +88,16 @@ protected:
#endif
};
template <typename T>
inline void
ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,
OwningNonNull<T>& aField,
const char* aName,
uint32_t aFlags = 0)
{
CycleCollectionNoteChild(aCallback, aField.get(), aName, aFlags);
}
} // namespace dom
} // namespace mozilla