/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This header will be included by headers that define refpointer and array // classes in order to specialize CC helpers such as ImplCycleCollectionTraverse // for them.
// Just a helper for appending "[i]". Didn't want to pull in string headers // here. void CycleCollectionNoteEdgeNameImpl(
nsCycleCollectionTraversalCallback& aCallback, constchar* aName,
uint32_t aFlags = 0);
// Should be inlined so that in the no-debug-info case this is just a simple // if().
MOZ_ALWAYS_INLINE void CycleCollectionNoteEdgeName(
nsCycleCollectionTraversalCallback& aCallback, constchar* aName,
uint32_t aFlags = 0) { if (MOZ_UNLIKELY(aCallback.WantDebugInfo())) {
CycleCollectionNoteEdgeNameImpl(aCallback, aName, aFlags);
}
}
// The default implementation of this class template is empty, because it // should never be used: see the partial specializations below. template <typename T, bool IsXPCOM = std::is_base_of<nsISupports, T>::value> struct CycleCollectionNoteChildImpl {};
// We declare CycleCollectionNoteChild in 3-argument and 4-argument variants, // rather than using default arguments, so that forward declarations work // regardless of header inclusion order. template <typename T> inlinevoid CycleCollectionNoteChild(
nsCycleCollectionTraversalCallback& aCallback, T* aChild, constchar* aName,
uint32_t aFlags) {
CycleCollectionNoteEdgeName(aCallback, aName, aFlags);
CycleCollectionNoteChildImpl<T>::Run(aCallback, aChild);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.