зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1776463 - Use C++17 inline variable for CountingAllocatorBase::sAmount. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D159360
This commit is contained in:
Родитель
99df2caf77
Коммит
056763e84d
|
@ -37,9 +37,3 @@ EXPORTS.mozilla += [
|
|||
"RemoteSpellCheckEngineChild.h",
|
||||
"RemoteSpellCheckEngineParent.h",
|
||||
]
|
||||
|
||||
if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
|
||||
CXXFLAGS += [
|
||||
# We force-include mozHunspellAllocator.h from third-party code.
|
||||
"-Wno-undefined-var-template",
|
||||
]
|
||||
|
|
|
@ -101,10 +101,6 @@ NS_IMPL_COMPONENT_FACTORY(mozHunspell) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
template <>
|
||||
mozilla::CountingAllocatorBase<HunspellAllocator>::AmountType
|
||||
mozilla::CountingAllocatorBase<HunspellAllocator>::sAmount(0);
|
||||
|
||||
mozHunspell::mozHunspell() {
|
||||
#ifdef DEBUG
|
||||
// There must be only one instance of this class: it reports memory based on
|
||||
|
|
|
@ -70,10 +70,6 @@ class FreetypeReporter final : public nsIMemoryReporter,
|
|||
|
||||
NS_IMPL_ISUPPORTS(FreetypeReporter, nsIMemoryReporter)
|
||||
|
||||
template <>
|
||||
CountingAllocatorBase<FreetypeReporter>::AmountType
|
||||
CountingAllocatorBase<FreetypeReporter>::sAmount(0);
|
||||
|
||||
static FT_MemoryRec_ sFreetypeMemoryRecord;
|
||||
|
||||
gfxAndroidPlatform::gfxAndroidPlatform() {
|
||||
|
|
|
@ -147,7 +147,7 @@ class CountingAllocatorBase {
|
|||
// must be thread-safe. It may be written during GC, so accesses are not
|
||||
// recorded.
|
||||
typedef Atomic<size_t, SequentiallyConsistent> AmountType;
|
||||
static AmountType sAmount;
|
||||
static inline AmountType sAmount{0};
|
||||
|
||||
MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(MallocSizeOfOnAlloc)
|
||||
MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(MallocSizeOfOnFree)
|
||||
|
|
|
@ -190,10 +190,6 @@ class ICUReporter final : public nsIMemoryReporter,
|
|||
|
||||
NS_IMPL_ISUPPORTS(ICUReporter, nsIMemoryReporter)
|
||||
|
||||
/* static */ template <>
|
||||
mozilla::CountingAllocatorBase<ICUReporter>::AmountType
|
||||
mozilla::CountingAllocatorBase<ICUReporter>::sAmount(0);
|
||||
|
||||
class OggReporter final : public nsIMemoryReporter,
|
||||
public mozilla::CountingAllocatorBase<OggReporter> {
|
||||
public:
|
||||
|
@ -216,10 +212,6 @@ class OggReporter final : public nsIMemoryReporter,
|
|||
|
||||
NS_IMPL_ISUPPORTS(OggReporter, nsIMemoryReporter)
|
||||
|
||||
/* static */ template <>
|
||||
mozilla::CountingAllocatorBase<OggReporter>::AmountType
|
||||
mozilla::CountingAllocatorBase<OggReporter>::sAmount(0);
|
||||
|
||||
static bool sInitializedJS = false;
|
||||
|
||||
static void InitializeJS() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче