Граф коммитов

6 Коммитов

Автор SHA1 Сообщение Дата
Nathan Froyd e07aa30b4b Bug 1097861 - make CycleCollectionNoteChild more easily forward-declarable; r=mccr8
Forward declaring functions with default arguments is difficult.  If you try to say:

template<typename T>
inline void
CycleCollectionNoteChild(nsCycleCollectionTraversalCallback& aCallback,
                         T* aChild, const char* aName, uint32_t aFlags);

and then later have:

template<typename T>
inline void
CycleCollectionNoteChild(nsCycleCollectionTraversalCallback& aCallback,
                         T* aChild, const char* aName, uint32_t aFlags = 0);
{
  ...
}

the compiler complains that default arguments cannot be added to a
function template that has already been declared.  If you attempt to
mollify the compiler by declaring instead:

template<typename T>
inline void
CycleCollectionNoteChild(nsCycleCollectionTraversalCallback& aCallback,
                         T* aChild, const char* aName, uint32_t aFlags = 0);

the compiler then complains about redefining the default argument (!)
when an actual definition is found.

To circumvent this, manually implement "default" arguments by providing
a three-argument form of CycleCollectionNoteChild, which simply forwards
to the four-argument version.
2014-11-12 15:22:32 -05:00
Birunthan Mohanathas c9fb2c0d48 Bug 1022456 - Fix modelines in xpcom/{base,glue,io,string,threads}/. r=froydnj 2014-06-30 08:39:45 -07:00
Birunthan Mohanathas 6b53f3d634 Bug 1022456 - Convert xpcom/glue/ to Gecko style. r=froydnj 2014-06-26 18:35:39 -07:00
Trevor Saunders 0179193261 bug 819215 - make NS_IMPL_CYCLE_COLLECTION_XXXCLASS unnecessary r=smaug, mccr8 2012-12-08 00:08:37 -05:00
Benoit Jacob 7cc7c472e5 Bug 806279 - CC macros refactoring: part 3: fold the TRAVERSE_NATIVE and AMBIGUOUS cases - r=mccr8,smaug 2012-11-15 02:32:39 -05:00
Benoit Jacob 6d7beedec6 Bug 806279 - CC macros refactoring: part 1: implement type-generic CC UNLINK/TRAVERSE macros - r=mccr8,smaug 2012-11-15 02:32:39 -05:00