diff --git a/xpcom/typelib/xpt/public/xpt_arena.h b/xpcom/typelib/xpt/public/xpt_arena.h index c4f208806a80..1192aada7f3c 100644 --- a/xpcom/typelib/xpt/public/xpt_arena.h +++ b/xpcom/typelib/xpt/public/xpt_arena.h @@ -12,6 +12,7 @@ #include "prtypes.h" #include +#include "mozilla/MemoryReporting.h" #include "mozilla/StandardInteger.h" @@ -53,11 +54,8 @@ XPT_NotifyDoneLoading(XPTArena *arena); XPT_PUBLIC_API(void) XPT_ArenaFree(XPTArena *arena, void* block); -/* A synonym of |nsMallocSizeOfFun|, because we don't #include nscore.h. */ -typedef size_t(*xptMallocSizeOfFun)(const void *p); - XPT_PUBLIC_API(size_t) -XPT_SizeOfArena(XPTArena *arena, xptMallocSizeOfFun mallocSizeOf); +XPT_SizeOfArena(XPTArena *arena, MozMallocSizeOf mallocSizeOf); /* --------------------------------------------------------- */ diff --git a/xpcom/typelib/xpt/src/xpt_arena.c b/xpcom/typelib/xpt/src/xpt_arena.c index 8efaa08b5609..c4bb161c5d4b 100644 --- a/xpcom/typelib/xpt/src/xpt_arena.c +++ b/xpcom/typelib/xpt/src/xpt_arena.c @@ -12,6 +12,7 @@ */ #include "xpt_arena.h" +#include "mozilla/MemoryReporting.h" #include #include #include @@ -306,7 +307,7 @@ XPT_AssertFailed(const char *s, const char *file, uint32_t lineno) #endif XPT_PUBLIC_API(size_t) -XPT_SizeOfArena(XPTArena *arena, xptMallocSizeOfFun mallocSizeOf) +XPT_SizeOfArena(XPTArena *arena, MozMallocSizeOf mallocSizeOf) { size_t n = mallocSizeOf(arena);