Bug 1058388 - Remove NS_COM_GLUE and IMETHOD_VISIBILITY. r=bsmedberg.

--HG--
extra : rebase_source : 250ec1323d4097101a8e0331a2bf7fab59f72b1d
This commit is contained in:
Nicholas Nethercote 2014-08-27 15:47:27 -07:00
Родитель 36c74581b8
Коммит f57e56e187
44 изменённых файлов: 179 добавлений и 214 удалений

Просмотреть файл

@ -42,7 +42,7 @@ typedef mozilla::ipc::SharedMemoryBasic::Handle CrossProcessMutexHandle;
typedef uintptr_t CrossProcessMutexHandle;
#endif
class NS_COM_GLUE CrossProcessMutex
class CrossProcessMutex
{
public:
/**

Просмотреть файл

@ -57,9 +57,6 @@
#define NS_HIDDEN NS_VISIBILITY_HIDDEN
#define NS_EXTERNAL_VIS NS_VISIBILITY_DEFAULT
#undef IMETHOD_VISIBILITY
#define IMETHOD_VISIBILITY
/**
* Mark a function as using a potentially non-standard function calling
* convention. This can be used on functions that are called very
@ -127,7 +124,7 @@
#define NS_IMPORT_(type) NS_EXTERNAL_VIS_(type)
#define NS_EXPORT NS_EXTERNAL_VIS
#define NS_EXPORT_(type) NS_EXTERNAL_VIS_(type)
#define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type
#define NS_IMETHOD_(type) virtual type
#define NS_IMETHODIMP_(type) type
#define NS_METHOD_(type) type
#define NS_CALLBACK_(_type, _name) _type (* _name)
@ -207,7 +204,6 @@
#endif
#ifdef MOZILLA_INTERNAL_API
# define NS_COM_GLUE
/*
The frozen string API has different definitions of nsAC?String
classes than the internal API. On systems that explicitly declare
@ -217,12 +213,6 @@
*/
# define nsAString nsAString_internal
# define nsACString nsACString_internal
#else
# ifdef HAVE_VISIBILITY_ATTRIBUTE
# define NS_COM_GLUE NS_VISIBILITY_HIDDEN
# else
# define NS_COM_GLUE
# endif
#endif
#if (defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING))

Просмотреть файл

@ -16,7 +16,7 @@ namespace mozilla {
// Like nsXREAppData, but releases all strong refs/allocated memory
// in the destructor.
class NS_COM_GLUE ScopedAppData : public nsXREAppData
class ScopedAppData : public nsXREAppData
{
public:
ScopedAppData()

Просмотреть файл

@ -46,7 +46,7 @@ template <class T> class DeadlockDetector;
* Base class of resources that might block clients trying to acquire them.
* Does debugging and deadlock detection in DEBUG builds.
**/
class NS_COM_GLUE BlockingResourceBase
class BlockingResourceBase
{
public:
// Needs to be kept in sync with kResourceTypeNames.

Просмотреть файл

@ -24,7 +24,7 @@ namespace mozilla {
* Vanilla condition variable. Please don't use this unless you have a
* compelling reason --- Monitor provides a simpler API.
*/
class NS_COM_GLUE CondVar : BlockingResourceBase
class CondVar : BlockingResourceBase
{
public:
/**

Просмотреть файл

@ -93,7 +93,7 @@ typedef Scoped<ScopedCloseFileTraits> ScopedCloseFile;
* @param aLength length of file to grow to.
* @return true on success.
*/
NS_COM_GLUE bool fallocate(PRFileDesc* aFD, int64_t aLength);
bool fallocate(PRFileDesc* aFD, int64_t aLength);
/**
* Use readahead to preload shared libraries into the file cache before loading.
@ -102,7 +102,7 @@ NS_COM_GLUE bool fallocate(PRFileDesc* aFD, int64_t aLength);
*
* @param aFile nsIFile representing path to shared library
*/
NS_COM_GLUE void ReadAheadLib(nsIFile* aFile);
void ReadAheadLib(nsIFile* aFile);
/**
* Use readahead to preload a file into the file cache before reading.
@ -115,9 +115,9 @@ NS_COM_GLUE void ReadAheadLib(nsIFile* aFile);
* @param aOutFd Pointer to file descriptor. If specified, ReadAheadFile will
* return its internal, opened file descriptor instead of closing it.
*/
NS_COM_GLUE void ReadAheadFile(nsIFile* aFile, const size_t aOffset = 0,
const size_t aCount = SIZE_MAX,
filedesc_t* aOutFd = nullptr);
void ReadAheadFile(nsIFile* aFile, const size_t aOffset = 0,
const size_t aCount = SIZE_MAX,
filedesc_t* aOutFd = nullptr);
#endif // !defined(XPCOM_GLUE)
@ -128,7 +128,7 @@ NS_COM_GLUE void ReadAheadFile(nsIFile* aFile, const size_t aOffset = 0,
*
* @param aFilePath path to shared library
*/
NS_COM_GLUE void ReadAheadLib(pathstr_t aFilePath);
void ReadAheadLib(pathstr_t aFilePath);
/**
* Use readahead to preload a file into the file cache before loading.
@ -141,9 +141,9 @@ NS_COM_GLUE void ReadAheadLib(pathstr_t aFilePath);
* @param aOutFd Pointer to file descriptor. If specified, ReadAheadFile will
* return its internal, opened file descriptor instead of closing it.
*/
NS_COM_GLUE void ReadAheadFile(pathstr_t aFilePath, const size_t aOffset = 0,
const size_t aCount = SIZE_MAX,
filedesc_t* aOutFd = nullptr);
void ReadAheadFile(pathstr_t aFilePath, const size_t aOffset = 0,
const size_t aCount = SIZE_MAX,
filedesc_t* aOutFd = nullptr);
/**
* Use readahead to preload a file into the file cache before reading.
@ -157,8 +157,8 @@ NS_COM_GLUE void ReadAheadFile(pathstr_t aFilePath, const size_t aOffset = 0,
* @param aOffset Offset into the file to begin preloading
* @param aCount Number of bytes to preload (SIZE_MAX implies file size)
*/
NS_COM_GLUE void ReadAhead(filedesc_t aFd, const size_t aOffset = 0,
const size_t aCount = SIZE_MAX);
void ReadAhead(filedesc_t aFd, const size_t aOffset = 0,
const size_t aCount = SIZE_MAX);
/* Define ReadSysFile() only on GONK to avoid unnecessary lubxul bloat.

Просмотреть файл

@ -18,14 +18,14 @@ class nsIThread;
* @param aResult
* The resulting nsIThread object.
*/
extern NS_COM_GLUE NS_METHOD NS_GetMainThread(nsIThread** aResult);
extern NS_METHOD NS_GetMainThread(nsIThread** aResult);
#ifdef MOZILLA_INTERNAL_API
// Fast access to the current thread. Do not release the returned pointer! If
// you want to use this pointer from some other thread, then you will need to
// AddRef it. Otherwise, you should only consider this pointer valid from code
// running on the current thread.
extern NS_COM_GLUE nsIThread* NS_GetCurrentThread();
extern nsIThread* NS_GetCurrentThread();
#endif
#ifdef MOZILLA_INTERNAL_API
@ -37,7 +37,7 @@ bool NS_IsMainThread();
* @returns true if the current thread is the main thread, and false
* otherwise.
*/
extern NS_COM_GLUE bool NS_IsMainThread();
extern bool NS_IsMainThread();
#endif
#endif // MainThreadUtils_h_

Просмотреть файл

@ -21,7 +21,7 @@ namespace mozilla {
* to instead use the RAII wrappers MonitorAutoLock and
* MonitorAutoUnlock.
*/
class NS_COM_GLUE Monitor
class Monitor
{
public:
explicit Monitor(const char* aName)
@ -69,7 +69,7 @@ private:
* The monitor must be unlocked when instances of this class are
* created.
*/
class NS_COM_GLUE MOZ_STACK_CLASS MonitorAutoLock
class MOZ_STACK_CLASS MonitorAutoLock
{
public:
explicit MonitorAutoLock(Monitor& aMonitor)
@ -108,7 +108,7 @@ private:
* The monitor must be locked by the current thread when instances of
* this class are created.
*/
class NS_COM_GLUE MOZ_STACK_CLASS MonitorAutoUnlock
class MOZ_STACK_CLASS MonitorAutoUnlock
{
public:
explicit MonitorAutoUnlock(Monitor& aMonitor)

Просмотреть файл

@ -34,7 +34,7 @@ namespace mozilla {
* include leak checking. Sometimes you want to intentionally "leak" a mutex
* until shutdown; in these cases, OffTheBooksMutex is for you.
*/
class NS_COM_GLUE OffTheBooksMutex : BlockingResourceBase
class OffTheBooksMutex : BlockingResourceBase
{
public:
/**
@ -117,7 +117,7 @@ private:
* When possible, use MutexAutoLock/MutexAutoUnlock to lock/unlock this
* mutex within a scope, instead of calling Lock/Unlock directly.
*/
class NS_COM_GLUE Mutex : public OffTheBooksMutex
class Mutex : public OffTheBooksMutex
{
public:
explicit Mutex(const char* aName)
@ -145,7 +145,7 @@ private:
* MUCH PREFERRED to bare calls to Mutex.Lock and Unlock.
*/
template<typename T>
class NS_COM_GLUE MOZ_STACK_CLASS BaseAutoLock
class MOZ_STACK_CLASS BaseAutoLock
{
public:
/**
@ -191,7 +191,7 @@ typedef BaseAutoLock<OffTheBooksMutex> OffTheBooksMutexAutoLock;
* MUCH PREFERRED to bare calls to Mutex.Unlock and Lock.
*/
template<typename T>
class NS_COM_GLUE MOZ_STACK_CLASS BaseAutoUnlock
class MOZ_STACK_CLASS BaseAutoUnlock
{
public:
explicit BaseAutoUnlock(T& aLock MOZ_GUARD_OBJECT_NOTIFIER_PARAM)

Просмотреть файл

@ -34,7 +34,7 @@ namespace mozilla {
* When possible, use ReentrantMonitorAutoEnter to hold this monitor within a
* scope, instead of calling Enter/Exit directly.
**/
class NS_COM_GLUE ReentrantMonitor : BlockingResourceBase
class ReentrantMonitor : BlockingResourceBase
{
public:
/**
@ -163,7 +163,7 @@ private:
*
* MUCH PREFERRED to bare calls to ReentrantMonitor.Enter and Exit.
*/
class NS_COM_GLUE MOZ_STACK_CLASS ReentrantMonitorAutoEnter
class MOZ_STACK_CLASS ReentrantMonitorAutoEnter
{
public:
/**

Просмотреть файл

@ -17,7 +17,7 @@ class nsCOMArray_base;
// Create an enumerator for an existing nsIArray implementation
// The enumerator holds an owning reference to the array.
NS_COM_GLUE nsresult
nsresult
NS_NewArrayEnumerator(nsISimpleEnumerator** aResult,
nsIArray* aArray);
@ -25,7 +25,7 @@ NS_NewArrayEnumerator(nsISimpleEnumerator** aResult,
// The enumerator will hold an owning reference to each ELEMENT in
// the array. This means that the nsCOMArray<T> can safely go away
// without its objects going away.
NS_COM_GLUE nsresult
nsresult
NS_NewArrayEnumerator(nsISimpleEnumerator** aResult,
const nsCOMArray_base& aArray);

Просмотреть файл

@ -11,7 +11,7 @@
#include "nsIArray.h"
// helper class for do_QueryElementAt
class NS_COM_GLUE nsQueryArrayElementAt : public nsCOMPtr_helper
class nsQueryArrayElementAt : public nsCOMPtr_helper
{
public:
nsQueryArrayElementAt(nsIArray* aArray, uint32_t aIndex,

Просмотреть файл

@ -18,7 +18,7 @@
// a class that's nsISupports-specific, so that we can contain the
// work of this class in the XPCOM dll
class NS_COM_GLUE nsCOMArray_base
class nsCOMArray_base
{
friend class nsArrayBase;
protected:

Просмотреть файл

@ -28,7 +28,6 @@
#include "nsDebug.h" // for |NS_ABORT_IF_FALSE|, |NS_ASSERTION|
#include "nsISupportsUtils.h" // for |nsresult|, |NS_ADDREF|, |NS_GET_TEMPLATE_IID| et al
#include "nscore.h" // for |NS_COM_GLUE|
#include "nsCycleCollectionNoteChild.h"
@ -289,7 +288,7 @@ public:
* often enough that the codesize savings are big enough to warrant the
* specialcasing.
*/
class NS_COM_GLUE MOZ_STACK_CLASS nsQueryInterface MOZ_FINAL
class MOZ_STACK_CLASS nsQueryInterface MOZ_FINAL
{
public:
explicit
@ -301,7 +300,7 @@ private:
nsISupports* mRawPtr;
};
class NS_COM_GLUE nsQueryInterfaceWithError
class nsQueryInterfaceWithError
{
public:
nsQueryInterfaceWithError(nsISupports* aRawPtr, nsresult* aError)
@ -350,7 +349,7 @@ do_QueryInterface(already_AddRefed<T>&, nsresult*)
////////////////////////////////////////////////////////////////////////////
// Using servicemanager with COMPtrs
class NS_COM_GLUE nsGetServiceByCID
class nsGetServiceByCID
{
public:
explicit nsGetServiceByCID(const nsCID& aCID) : mCID(aCID) {}
@ -361,7 +360,7 @@ private:
const nsCID& mCID;
};
class NS_COM_GLUE nsGetServiceByCIDWithError
class nsGetServiceByCIDWithError
{
public:
nsGetServiceByCIDWithError(const nsCID& aCID, nsresult* aErrorPtr)
@ -377,7 +376,7 @@ private:
nsresult* mErrorPtr;
};
class NS_COM_GLUE nsGetServiceByContractID
class nsGetServiceByContractID
{
public:
explicit nsGetServiceByContractID(const char* aContractID)
@ -391,7 +390,7 @@ private:
const char* mContractID;
};
class NS_COM_GLUE nsGetServiceByContractIDWithError
class nsGetServiceByContractIDWithError
{
public:
nsGetServiceByContractIDWithError(const char* aContractID, nsresult* aErrorPtr)
@ -421,7 +420,7 @@ class nsCOMPtr_base
public:
explicit nsCOMPtr_base(nsISupports* aRawPtr = 0) : mRawPtr(aRawPtr) {}
NS_COM_GLUE NS_CONSTRUCTOR_FASTCALL ~nsCOMPtr_base()
NS_CONSTRUCTOR_FASTCALL ~nsCOMPtr_base()
{
NSCAP_LOG_RELEASE(this, mRawPtr);
if (mRawPtr) {
@ -429,24 +428,24 @@ public:
}
}
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_with_AddRef(nsISupports*);
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_from_qi(const nsQueryInterface, const nsIID&);
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_from_qi_with_error(const nsQueryInterfaceWithError&, const nsIID&);
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_from_gs_cid(const nsGetServiceByCID, const nsIID&);
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_from_gs_cid_with_error(const nsGetServiceByCIDWithError&, const nsIID&);
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_from_gs_contractid(const nsGetServiceByContractID, const nsIID&);
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_from_gs_contractid_with_error(const nsGetServiceByContractIDWithError&,
const nsIID&);
NS_COM_GLUE void NS_FASTCALL
void NS_FASTCALL
assign_from_helper(const nsCOMPtr_helper&, const nsIID&);
NS_COM_GLUE void** NS_FASTCALL
void** NS_FASTCALL
begin_assignment();
protected:

Просмотреть файл

@ -17,7 +17,7 @@
* @param aDelims The set of delimiters (null-terminated)
* @param aStr The string to search (null-terminated)
*/
NS_COM_GLUE const char* NS_strspnp(const char* aDelims, const char* aStr);
const char* NS_strspnp(const char* aDelims, const char* aStr);
/**
* Tokenize a string. This function is similar to the strtok function in the
@ -35,39 +35,39 @@ NS_COM_GLUE const char* NS_strspnp(const char* aDelims, const char* aStr);
* @return The token. If no token is found (the string is only
* delimiter characters), nullptr is returned.
*/
NS_COM_GLUE char* NS_strtok(const char* aDelims, char** aStr);
char* NS_strtok(const char* aDelims, char** aStr);
/**
* "strlen" for char16_t strings
*/
NS_COM_GLUE uint32_t NS_strlen(const char16_t* aString);
uint32_t NS_strlen(const char16_t* aString);
/**
* "strcmp" for char16_t strings
*/
NS_COM_GLUE int NS_strcmp(const char16_t* aStrA, const char16_t* aStrB);
int NS_strcmp(const char16_t* aStrA, const char16_t* aStrB);
/**
* "strdup" for char16_t strings, uses the NS_Alloc allocator.
*/
NS_COM_GLUE char16_t* NS_strdup(const char16_t* aString);
char16_t* NS_strdup(const char16_t* aString);
/**
* "strdup", but using the NS_Alloc allocator.
*/
NS_COM_GLUE char* NS_strdup(const char* aString);
char* NS_strdup(const char* aString);
/**
* strndup for char16_t strings... this function will ensure that the
* new string is null-terminated. Uses the NS_Alloc allocator.
*/
NS_COM_GLUE char16_t* NS_strndup(const char16_t* aString, uint32_t aLen);
char16_t* NS_strndup(const char16_t* aString, uint32_t aLen);
// The following case-conversion methods only deal in the ascii repertoire
// A-Z and a-z
// semi-private data declarations... don't use these directly.
class NS_COM_GLUE nsLowerUpperUtils
class nsLowerUpperUtils
{
public:
static const unsigned char kLower2Upper[256];
@ -86,19 +86,19 @@ NS_ToLower(char aChar)
return (char)nsLowerUpperUtils::kUpper2Lower[(unsigned char)aChar];
}
NS_COM_GLUE bool NS_IsUpper(char aChar);
NS_COM_GLUE bool NS_IsLower(char aChar);
bool NS_IsUpper(char aChar);
bool NS_IsLower(char aChar);
NS_COM_GLUE bool NS_IsAscii(char16_t aChar);
NS_COM_GLUE bool NS_IsAscii(const char16_t* aString);
NS_COM_GLUE bool NS_IsAsciiAlpha(char16_t aChar);
NS_COM_GLUE bool NS_IsAsciiDigit(char16_t aChar);
NS_COM_GLUE bool NS_IsAsciiWhitespace(char16_t aChar);
NS_COM_GLUE bool NS_IsAscii(const char* aString);
NS_COM_GLUE bool NS_IsAscii(const char* aString, uint32_t aLength);
bool NS_IsAscii(char16_t aChar);
bool NS_IsAscii(const char16_t* aString);
bool NS_IsAsciiAlpha(char16_t aChar);
bool NS_IsAsciiDigit(char16_t aChar);
bool NS_IsAsciiWhitespace(char16_t aChar);
bool NS_IsAscii(const char* aString);
bool NS_IsAscii(const char* aString, uint32_t aLength);
#ifndef XPCOM_GLUE_AVOID_NSPR
NS_COM_GLUE void NS_MakeRandomString(char* aBuf, int32_t aBufLen);
void NS_MakeRandomString(char* aBuf, int32_t aBufLen);
#endif
#define FF '\f'

Просмотреть файл

@ -22,7 +22,7 @@
#include "nsXPCOM.h"
class NS_COM_GLUE nsCategoryObserver MOZ_FINAL : public nsIObserver
class nsCategoryObserver MOZ_FINAL : public nsIObserver
{
~nsCategoryObserver();

Просмотреть файл

@ -13,22 +13,20 @@
#include "nsIFactory.h"
NS_COM_GLUE nsresult CallCreateInstance(const nsCID& aClass,
nsISupports* aDelegate,
const nsIID& aIID, void** aResult);
nsresult CallCreateInstance(const nsCID& aClass, nsISupports* aDelegate,
const nsIID& aIID, void** aResult);
NS_COM_GLUE nsresult CallCreateInstance(const char* aContractID,
nsISupports* aDelegate,
const nsIID& aIID, void** aResult);
nsresult CallCreateInstance(const char* aContractID, nsISupports* aDelegate,
const nsIID& aIID, void** aResult);
NS_COM_GLUE nsresult CallGetClassObject(const nsCID& aClass, const nsIID& aIID,
void** aResult);
nsresult CallGetClassObject(const nsCID& aClass, const nsIID& aIID,
void** aResult);
NS_COM_GLUE nsresult CallGetClassObject(const char* aContractID,
const nsIID& aIID, void** aResult);
nsresult CallGetClassObject(const char* aContractID, const nsIID& aIID,
void** aResult);
class NS_COM_GLUE nsCreateInstanceByCID : public nsCOMPtr_helper
class nsCreateInstanceByCID : public nsCOMPtr_helper
{
public:
nsCreateInstanceByCID(const nsCID& aCID, nsISupports* aOuter,
@ -47,7 +45,7 @@ private:
nsresult* mErrorPtr;
};
class NS_COM_GLUE nsCreateInstanceByContractID : public nsCOMPtr_helper
class nsCreateInstanceByContractID : public nsCOMPtr_helper
{
public:
nsCreateInstanceByContractID(const char* aContractID, nsISupports* aOuter,
@ -66,7 +64,7 @@ private:
nsresult* mErrorPtr;
};
class NS_COM_GLUE nsCreateInstanceFromFactory : public nsCOMPtr_helper
class nsCreateInstanceFromFactory : public nsCOMPtr_helper
{
public:
nsCreateInstanceFromFactory(nsIFactory* aFactory, nsISupports* aOuter,
@ -125,7 +123,7 @@ do_CreateInstance(nsIFactory* aFactory, nsISupports* aOuter,
}
class NS_COM_GLUE nsGetClassObjectByCID : public nsCOMPtr_helper
class nsGetClassObjectByCID : public nsCOMPtr_helper
{
public:
nsGetClassObjectByCID(const nsCID& aCID, nsresult* aErrorPtr)
@ -141,7 +139,7 @@ private:
nsresult* mErrorPtr;
};
class NS_COM_GLUE nsGetClassObjectByContractID : public nsCOMPtr_helper
class nsGetClassObjectByContractID : public nsCOMPtr_helper
{
public:
nsGetClassObjectByContractID(const char* aContractID, nsresult* aErrorPtr)

Просмотреть файл

@ -184,8 +184,8 @@ public:
NS_IMETHOD_(void) Trace(void* aPtr, const TraceCallbacks& aCb,
void* aClosure) = 0;
static void NS_COM_GLUE NoteJSChild(void* aScriptThing, const char* aName,
void* aClosure);
static void NoteJSChild(void* aScriptThing, const char* aName,
void* aClosure);
};
class NS_NO_VTABLE nsXPCOMCycleCollectionParticipant : public nsScriptObjectTracer

Просмотреть файл

@ -402,16 +402,16 @@ typedef void (*StderrCallback)(const char* aFmt, va_list aArgs);
extern "C" {
#endif
NS_COM_GLUE void printf_stderr(const char* aFmt, ...);
void printf_stderr(const char* aFmt, ...);
NS_COM_GLUE void vprintf_stderr(const char* aFmt, va_list aArgs);
void vprintf_stderr(const char* aFmt, va_list aArgs);
// fprintf with special handling for stderr to print to the console
NS_COM_GLUE void fprintf_stderr(FILE* aFile, const char* aFmt, ...);
void fprintf_stderr(FILE* aFile, const char* aFmt, ...);
// used by the profiler to log stderr in the profiler for more
// advanced performance debugging and display/layers visualization.
NS_COM_GLUE void set_stderr_callback(StderrCallback aCallback);
void set_stderr_callback(StderrCallback aCallback);
#ifdef __cplusplus
}

Просмотреть файл

@ -61,7 +61,7 @@ public:
class nsDequeIterator;
class NS_COM_GLUE nsDeque
class nsDeque
{
friend class nsDequeIterator;
typedef mozilla::fallible_t fallible_t;
@ -236,7 +236,7 @@ private:
* Here comes the nsDequeIterator class...
******************************************************/
class NS_COM_GLUE nsDequeIterator
class nsDequeIterator
{
public:
/**

Просмотреть файл

@ -12,13 +12,13 @@
class nsISupports;
class nsISimpleEnumerator;
NS_COM_GLUE nsresult NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);
nsresult NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);
NS_COM_GLUE nsresult NS_NewSingletonEnumerator(nsISimpleEnumerator** aResult,
nsISupports* aSingleton);
nsresult NS_NewSingletonEnumerator(nsISimpleEnumerator** aResult,
nsISupports* aSingleton);
NS_COM_GLUE nsresult NS_NewUnionEnumerator(nsISimpleEnumerator** aResult,
nsISimpleEnumerator* aFirstEnumerator,
nsISimpleEnumerator* aSecondEnumerator);
nsresult NS_NewUnionEnumerator(nsISimpleEnumerator** aResult,
nsISimpleEnumerator* aFirstEnumerator,
nsISimpleEnumerator* aSecondEnumerator);
#endif /* nsEnumeratorUtils_h__ */

Просмотреть файл

@ -84,7 +84,7 @@
* as a singleton.
*/
class NS_COM_GLUE GenericClassInfo : public nsIClassInfo
class GenericClassInfo : public nsIClassInfo
{
public:
struct ClassInfoData

Просмотреть файл

@ -54,7 +54,7 @@ struct nsID
* nsID Parsing method. Turns a {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
* string into an nsID
*/
NS_COM_GLUE bool Parse(const char* aIDStr);
bool Parse(const char* aIDStr);
#ifndef XPCOM_GLUE_AVOID_NSPR
/**
@ -62,14 +62,14 @@ struct nsID
* {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} format. Caller should free string.
* YOU SHOULD ONLY USE THIS IF YOU CANNOT USE ToProvidedString() BELOW.
*/
NS_COM_GLUE char* ToString() const;
char* ToString() const;
/**
* nsID string encoder. Builds a string in
* {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} format, into a char[NSID_LENGTH]
* buffer provided by the caller (for instance, on the stack).
*/
NS_COM_GLUE void ToProvidedString(char (&aDest)[NSID_LENGTH]) const;
void ToProvidedString(char (&aDest)[NSID_LENGTH]) const;
#endif // XPCOM_GLUE_AVOID_NSPR

Просмотреть файл

@ -22,7 +22,7 @@ CallGetInterface(T* aSource, DestinationType** aDestination)
reinterpret_cast<void**>(aDestination));
}
class NS_COM_GLUE nsGetInterface : public nsCOMPtr_helper
class nsGetInterface : public nsCOMPtr_helper
{
public:
nsGetInterface(nsISupports* aSource, nsresult* aError)

Просмотреть файл

@ -21,7 +21,7 @@
class nsIFile;
class NS_COM_GLUE nsINIParser
class nsINIParser
{
public:
nsINIParser() {}

Просмотреть файл

@ -747,7 +747,7 @@ struct QITableEntry
int32_t offset;
};
NS_COM_GLUE nsresult NS_FASTCALL
nsresult NS_FASTCALL
NS_TableDrivenQI(void* aThis, REFNSIID aIID,
void** aInstancePtr, const QITableEntry* aEntries);

Просмотреть файл

@ -30,7 +30,7 @@ CallQueryReferent(T* aSource, DestinationType** aDestination)
}
class NS_COM_GLUE nsQueryReferent : public nsCOMPtr_helper
class nsQueryReferent : public nsCOMPtr_helper
{
public:
nsQueryReferent(nsIWeakReference* aWeakPtr, nsresult* aError)
@ -56,8 +56,8 @@ do_QueryReferent(nsIWeakReference* aRawPtr, nsresult* aError = 0)
/**
* Deprecated, use |do_GetWeakReference| instead.
*/
extern NS_COM_GLUE nsIWeakReference* NS_GetWeakReference(nsISupports*,
nsresult* aResult = 0);
extern nsIWeakReference* NS_GetWeakReference(nsISupports*,
nsresult* aResult = 0);
/**
* |do_GetWeakReference| is a convenience function that bundles up all the work needed

Просмотреть файл

@ -15,7 +15,7 @@
////////////////////////////////////////////////////////////////////////////////
// nsMemory static helper routines
NS_COM_GLUE nsresult
nsresult
nsMemory::HeapMinimize(bool aImmediate)
{
nsCOMPtr<nsIMemory> mem;
@ -27,7 +27,7 @@ nsMemory::HeapMinimize(bool aImmediate)
return mem->HeapMinimize(aImmediate);
}
NS_COM_GLUE void*
void*
nsMemory::Clone(const void* aPtr, size_t aSize)
{
void* newPtr = NS_Alloc(aSize);
@ -37,7 +37,7 @@ nsMemory::Clone(const void* aPtr, size_t aSize)
return newPtr;
}
NS_COM_GLUE nsIMemory*
nsIMemory*
nsMemory::GetGlobalMemoryService()
{
nsIMemory* mem;

Просмотреть файл

@ -48,9 +48,9 @@ public:
NS_Free(aPtr);
}
static NS_COM_GLUE nsresult HeapMinimize(bool aImmediate);
static NS_COM_GLUE void* Clone(const void* aPtr, size_t aSize);
static NS_COM_GLUE nsIMemory* GetGlobalMemoryService(); // AddRefs
static nsresult HeapMinimize(bool aImmediate);
static void* Clone(const void* aPtr, size_t aSize);
static nsIMemory* GetGlobalMemoryService(); // AddRefs
};
/**

Просмотреть файл

@ -61,7 +61,7 @@ NS_ProxyRelease(nsIEventTarget* aTarget, nsRefPtr<T>& aDoomed,
* true, then an event will always be posted to the target thread for
* asynchronous release.
*/
NS_COM_GLUE nsresult
nsresult
NS_ProxyRelease(nsIEventTarget* aTarget, nsISupports* aDoomed,
bool aAlwaysProxy = false);

Просмотреть файл

@ -30,9 +30,9 @@ extern "C" {
* + greater than zero if the second element should be before the first
* 5. extra data to pass to comparison function
*/
NS_COM_GLUE void NS_QuickSort(void*, unsigned int, unsigned int,
int (*)(const void*, const void*, void*),
void*);
void NS_QuickSort(void*, unsigned int, unsigned int,
int (*)(const void*, const void*, void*),
void*);
#ifdef __cplusplus
}

Просмотреть файл

@ -59,11 +59,10 @@ do_GetServiceFromCategory(const char* aCategory, const char* aEntry,
return nsGetServiceFromCategory(aCategory, aEntry, aError);
}
NS_COM_GLUE nsresult CallGetService(const nsCID& aClass, const nsIID& aIID,
void** aResult);
nsresult CallGetService(const nsCID& aClass, const nsIID& aIID, void** aResult);
NS_COM_GLUE nsresult CallGetService(const char* aContractID, const nsIID& aIID,
void** aResult);
nsresult CallGetService(const char* aContractID, const nsIID& aIID,
void** aResult);
// type-safe shortcuts for calling |GetService|
template<class DestinationType>

Просмотреть файл

@ -1163,7 +1163,7 @@ CopyASCIItoUTF16(const nsACString& aSource, nsAString& aDest)
NS_CStringToUTF16(aSource, NS_CSTRING_ENCODING_ASCII, aDest);
}
NS_COM_GLUE char*
char*
ToNewUTF8String(const nsAString& aSource);
class NS_ConvertASCIItoUTF16 : public nsString
@ -1359,7 +1359,7 @@ getter_Copies(nsCString& aString)
* substrings
*/
class NS_COM_GLUE nsDependentSubstring : public nsStringContainer
class nsDependentSubstring : public nsStringContainer
{
public:
typedef nsDependentSubstring self_type;
@ -1392,7 +1392,7 @@ private:
self_type& operator=(const self_type& aString) MOZ_DELETE;
};
class NS_COM_GLUE nsDependentCSubstring : public nsCStringContainer
class nsDependentCSubstring : public nsCStringContainer
{
public:
typedef nsDependentCSubstring self_type;

Просмотреть файл

@ -227,7 +227,7 @@ struct nsTArrayInfallibleAllocator : nsTArrayInfallibleAllocatorBase
// nsTArray_base stores elements into the space allocated beyond
// sizeof(*this). This is done to minimize the size of the nsTArray
// object when it is empty.
struct NS_COM_GLUE nsTArrayHeader
struct nsTArrayHeader
{
static nsTArrayHeader sEmptyHdr;

Просмотреть файл

@ -19,10 +19,10 @@
#include <new>
// helper function for nsTHashtable::Clear()
NS_COM_GLUE PLDHashOperator PL_DHashStubEnumRemove(PLDHashTable* aTable,
PLDHashEntryHdr* aEntry,
uint32_t aOrdinal,
void* aUserArg);
PLDHashOperator PL_DHashStubEnumRemove(PLDHashTable* aTable,
PLDHashEntryHdr* aEntry,
uint32_t aOrdinal,
void* aUserArg);
/**

Просмотреть файл

@ -21,7 +21,7 @@
* @see nsTObserverArray, nsTArray
*/
class NS_COM_GLUE nsTObserverArray_base
class nsTObserverArray_base
{
public:
typedef size_t index_type;

Просмотреть файл

@ -40,7 +40,7 @@
#error "nsTextFormatter is not available in the standalone glue due to NSPR dependencies."
#endif
class NS_COM_GLUE nsTextFormatter
class nsTextFormatter
{
public:

Просмотреть файл

@ -26,15 +26,14 @@
/**
* Set name of the target thread. This operation is asynchronous.
*/
extern NS_COM_GLUE void NS_SetThreadName(nsIThread* aThread,
const nsACString& aName);
extern void NS_SetThreadName(nsIThread* aThread, const nsACString& aName);
/**
* Static length version of the above function checking length of the
* name at compile time.
*/
template<size_t LEN>
inline NS_COM_GLUE void
inline void
NS_SetThreadName(nsIThread* aThread, const char (&aName)[LEN])
{
static_assert(LEN <= 16,
@ -55,7 +54,7 @@ NS_SetThreadName(nsIThread* aThread, const char (&aName)[LEN])
* @returns NS_ERROR_INVALID_ARG
* Indicates that the given name is not unique.
*/
extern NS_COM_GLUE NS_METHOD
extern NS_METHOD
NS_NewThread(nsIThread** aResult,
nsIRunnable* aInitialEvent = nullptr,
uint32_t aStackSize = nsIThreadManager::DEFAULT_STACK_SIZE);
@ -93,7 +92,7 @@ NS_NewNamedThread(const char (&aName)[LEN],
* @param aResult
* The resulting nsIThread object.
*/
extern NS_COM_GLUE NS_METHOD NS_GetCurrentThread(nsIThread** aResult);
extern NS_METHOD NS_GetCurrentThread(nsIThread** aResult);
/**
* Dispatch the given event to the current thread.
@ -104,7 +103,7 @@ extern NS_COM_GLUE NS_METHOD NS_GetCurrentThread(nsIThread** aResult);
* @returns NS_ERROR_INVALID_ARG
* If event is null.
*/
extern NS_COM_GLUE NS_METHOD NS_DispatchToCurrentThread(nsIRunnable* aEvent);
extern NS_METHOD NS_DispatchToCurrentThread(nsIRunnable* aEvent);
/**
* Dispatch the given event to the main thread.
@ -117,7 +116,7 @@ extern NS_COM_GLUE NS_METHOD NS_DispatchToCurrentThread(nsIRunnable* aEvent);
* @returns NS_ERROR_INVALID_ARG
* If event is null.
*/
extern NS_COM_GLUE NS_METHOD
extern NS_METHOD
NS_DispatchToMainThread(nsIRunnable* aEvent,
uint32_t aDispatchFlags = NS_DISPATCH_NORMAL);
@ -137,7 +136,7 @@ NS_DispatchToMainThread(nsIRunnable* aEvent,
* value is simply used to determine whether or not to process another event.
* Pass PR_INTERVAL_NO_TIMEOUT to specify no timeout.
*/
extern NS_COM_GLUE NS_METHOD
extern NS_METHOD
NS_ProcessPendingEvents(nsIThread* aThread,
PRIntervalTime aTimeout = PR_INTERVAL_NO_TIMEOUT);
#endif
@ -156,7 +155,7 @@ NS_ProcessPendingEvents(nsIThread* aThread,
* A boolean value that if "true" indicates that there are pending events
* in the current thread's event queue.
*/
extern NS_COM_GLUE bool NS_HasPendingEvents(nsIThread* aThread = nullptr);
extern bool NS_HasPendingEvents(nsIThread* aThread = nullptr);
/**
* Shortcut for nsIThread::ProcessNextEvent.
@ -175,8 +174,8 @@ extern NS_COM_GLUE bool NS_HasPendingEvents(nsIThread* aThread = nullptr);
* A boolean value that if "true" indicates that an event from the current
* thread's event queue was processed.
*/
extern NS_COM_GLUE bool NS_ProcessNextEvent(nsIThread* aThread = nullptr,
bool aMayWait = true);
extern bool NS_ProcessNextEvent(nsIThread* aThread = nullptr,
bool aMayWait = true);
//-----------------------------------------------------------------------------
// Helpers that work with nsCOMPtr:
@ -204,18 +203,15 @@ do_GetMainThread()
// you want to use this pointer from some other thread, then you will need to
// AddRef it. Otherwise, you should only consider this pointer valid from code
// running on the current thread.
extern NS_COM_GLUE nsIThread* NS_GetCurrentThread();
extern nsIThread* NS_GetCurrentThread();
#endif
//-----------------------------------------------------------------------------
#ifndef XPCOM_GLUE_AVOID_NSPR
#undef IMETHOD_VISIBILITY
#define IMETHOD_VISIBILITY NS_COM_GLUE
// This class is designed to be subclassed.
class NS_COM_GLUE nsRunnable : public nsIRunnable
class nsRunnable : public nsIRunnable
{
public:
NS_DECL_THREADSAFE_ISUPPORTS
@ -228,7 +224,7 @@ protected:
};
// This class is designed to be subclassed.
class NS_COM_GLUE nsCancelableRunnable : public nsICancelableRunnable
class nsCancelableRunnable : public nsICancelableRunnable
{
public:
NS_DECL_THREADSAFE_ISUPPORTS
@ -241,9 +237,6 @@ protected:
virtual ~nsCancelableRunnable() {}
};
#undef IMETHOD_VISIBILITY
#define IMETHOD_VISIBILITY
// An event that can be used to call a method on a class. The class type must
// support reference counting. This event supports Revoke for use
// with nsRevocableEventPtr.

Просмотреть файл

@ -43,14 +43,13 @@
namespace mozilla {
int32_t NS_COM_GLUE CompareVersions(const char* aStrA, const char* aStrB);
int32_t CompareVersions(const char* aStrA, const char* aStrB);
#ifdef XP_WIN
int32_t NS_COM_GLUE CompareVersions(const char16_t* aStrA,
const char16_t* aStrB);
int32_t CompareVersions(const char16_t* aStrA, const char16_t* aStrB);
#endif
struct NS_COM_GLUE Version
struct Version
{
explicit Version(const char* aVersionString)
{
@ -121,7 +120,7 @@ private:
};
#ifdef XP_WIN
struct NS_COM_GLUE VersionW
struct VersionW
{
VersionW(const char16_t* aVersionStringW)
{

Просмотреть файл

@ -26,7 +26,7 @@ typedef size_t (*nsVoidArraySizeOfElementIncludingThisFunc)(
const void* aElement, mozilla::MallocSizeOf aMallocSizeOf, void* aData);
/// A basic zero-based array of void*'s that manages its own memory
class NS_COM_GLUE nsVoidArray
class nsVoidArray
{
public:
nsVoidArray();
@ -177,7 +177,7 @@ private:
// today, there should not be any virtualness to it to avoid the vtable
// ptr overhead.
class NS_COM_GLUE nsSmallVoidArray : private nsVoidArray
class nsSmallVoidArray : private nsVoidArray
{
public:
~nsSmallVoidArray();

Просмотреть файл

@ -66,7 +66,7 @@ nsQueryReferent::operator()(const nsIID& aIID, void** aAnswer) const
return status;
}
NS_COM_GLUE nsIWeakReference* // or else |already_AddRefed<nsIWeakReference>|
nsIWeakReference* // or else |already_AddRefed<nsIWeakReference>|
NS_GetWeakReference(nsISupports* aInstancePtr, nsresult* aErrorPtr)
{
nsresult status;
@ -90,7 +90,7 @@ NS_GetWeakReference(nsISupports* aInstancePtr, nsresult* aErrorPtr)
return result;
}
NS_COM_GLUE nsresult
nsresult
nsSupportsWeakReference::GetWeakReference(nsIWeakReference** aInstancePtr)
{
if (!aInstancePtr) {

Просмотреть файл

@ -15,12 +15,7 @@
class nsWeakReference;
// Set IMETHOD_VISIBILITY to empty so that the class-level NS_COM declaration
// controls member method visibility.
#undef IMETHOD_VISIBILITY
#define IMETHOD_VISIBILITY NS_COM_GLUE
class NS_COM_GLUE nsSupportsWeakReference : public nsISupportsWeakReference
class nsSupportsWeakReference : public nsISupportsWeakReference
{
public:
nsSupportsWeakReference() : mProxy(0) {}
@ -44,9 +39,6 @@ protected:
bool HasWeakReferences() const { return mProxy != 0; }
};
#undef IMETHOD_VISIBILITY
#define IMETHOD_VISIBILITY
inline
nsSupportsWeakReference::~nsSupportsWeakReference()
{

Просмотреть файл

@ -385,12 +385,11 @@ struct PLDHashTableOps
/*
* Default implementations for the above ops.
*/
NS_COM_GLUE void* PL_DHashAllocTable(PLDHashTable* aTable, uint32_t aNBytes);
void* PL_DHashAllocTable(PLDHashTable* aTable, uint32_t aNBytes);
NS_COM_GLUE void PL_DHashFreeTable(PLDHashTable* aTable, void* aPtr);
void PL_DHashFreeTable(PLDHashTable* aTable, void* aPtr);
NS_COM_GLUE PLDHashNumber PL_DHashStringKey(PLDHashTable* aTable,
const void* aKey);
PLDHashNumber PL_DHashStringKey(PLDHashTable* aTable, const void* aKey);
/* A minimal entry contains a keyHash header and a void key pointer. */
struct PLDHashEntryStub
@ -399,36 +398,33 @@ struct PLDHashEntryStub
const void* key;
};
NS_COM_GLUE PLDHashNumber PL_DHashVoidPtrKeyStub(PLDHashTable* aTable,
const void* aKey);
PLDHashNumber PL_DHashVoidPtrKeyStub(PLDHashTable* aTable, const void* aKey);
NS_COM_GLUE bool PL_DHashMatchEntryStub(PLDHashTable* aTable,
const PLDHashEntryHdr* aEntry,
const void* aKey);
bool PL_DHashMatchEntryStub(PLDHashTable* aTable,
const PLDHashEntryHdr* aEntry,
const void* aKey);
NS_COM_GLUE bool PL_DHashMatchStringKey(PLDHashTable* aTable,
const PLDHashEntryHdr* aEntry,
const void* aKey);
bool PL_DHashMatchStringKey(PLDHashTable* aTable,
const PLDHashEntryHdr* aEntry,
const void* aKey);
NS_COM_GLUE void
void
PL_DHashMoveEntryStub(PLDHashTable* aTable,
const PLDHashEntryHdr* aFrom,
PLDHashEntryHdr* aTo);
NS_COM_GLUE void PL_DHashClearEntryStub(PLDHashTable* aTable,
PLDHashEntryHdr* aEntry);
void PL_DHashClearEntryStub(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
NS_COM_GLUE void PL_DHashFreeStringKey(PLDHashTable* aTable,
PLDHashEntryHdr* aEntry);
void PL_DHashFreeStringKey(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
NS_COM_GLUE void PL_DHashFinalizeStub(PLDHashTable* aTable);
void PL_DHashFinalizeStub(PLDHashTable* aTable);
/*
* If you use PLDHashEntryStub or a subclass of it as your entry struct, and
* if your entries move via memcpy and clear via memset(0), you can use these
* stub operations.
*/
NS_COM_GLUE const PLDHashTableOps* PL_DHashGetStubOps(void);
const PLDHashTableOps* PL_DHashGetStubOps(void);
/*
* Dynamically allocate a new PLDHashTable using malloc, initialize it using
@ -436,7 +432,7 @@ NS_COM_GLUE const PLDHashTableOps* PL_DHashGetStubOps(void);
* Note that the entry storage at aTable->mEntryStore will be allocated using
* the aOps->allocTable callback.
*/
NS_COM_GLUE PLDHashTable* PL_NewDHashTable(
PLDHashTable* PL_NewDHashTable(
const PLDHashTableOps* aOps, void* aData, uint32_t aEntrySize,
uint32_t aLength = PL_DHASH_DEFAULT_INITIAL_LENGTH);
@ -444,7 +440,7 @@ NS_COM_GLUE PLDHashTable* PL_NewDHashTable(
* Finalize aTable's data, free its entry storage (via aTable->ops->freeTable),
* and return the memory starting at aTable to the malloc heap.
*/
NS_COM_GLUE void PL_DHashTableDestroy(PLDHashTable* aTable);
void PL_DHashTableDestroy(PLDHashTable* aTable);
/*
* Initialize aTable with aOps, aData, aEntrySize, and aCapacity. The table's
@ -455,7 +451,7 @@ NS_COM_GLUE void PL_DHashTableDestroy(PLDHashTable* aTable);
* This function will crash if it can't allocate enough memory, or if
* |aEntrySize| and/or |aLength| are too large.
*/
NS_COM_GLUE void PL_DHashTableInit(
void PL_DHashTableInit(
PLDHashTable* aTable, const PLDHashTableOps* aOps, void* aData,
uint32_t aEntrySize, uint32_t aLength = PL_DHASH_DEFAULT_INITIAL_LENGTH);
@ -463,7 +459,7 @@ NS_COM_GLUE void PL_DHashTableInit(
* Initialize aTable. This is the same as PL_DHashTableInit, except that it
* returns a boolean indicating success, rather than crashing on failure.
*/
MOZ_WARN_UNUSED_RESULT NS_COM_GLUE bool PL_DHashTableInit(
MOZ_WARN_UNUSED_RESULT bool PL_DHashTableInit(
PLDHashTable* aTable, const PLDHashTableOps* aOps, void* aData,
uint32_t aEntrySize, const mozilla::fallible_t&,
uint32_t aLength = PL_DHASH_DEFAULT_INITIAL_LENGTH);
@ -474,7 +470,7 @@ MOZ_WARN_UNUSED_RESULT NS_COM_GLUE bool PL_DHashTableInit(
* pointers dangling). If you want to burn cycles clearing aTable, it's up to
* your code to call memset.
*/
NS_COM_GLUE void PL_DHashTableFinish(PLDHashTable* aTable);
void PL_DHashTableFinish(PLDHashTable* aTable);
/*
* To lookup a key in table, call:
@ -506,7 +502,7 @@ NS_COM_GLUE void PL_DHashTableFinish(PLDHashTable* aTable);
* the entry is marked so that PL_DHASH_ENTRY_IS_FREE(entry). This operation
* returns null unconditionally; you should ignore its return value.
*/
NS_COM_GLUE PLDHashEntryHdr* PL_DHASH_FASTCALL
PLDHashEntryHdr* PL_DHASH_FASTCALL
PL_DHashTableOperate(PLDHashTable* aTable, const void* aKey,
PLDHashOperator aOp);
@ -519,10 +515,9 @@ PL_DHashTableOperate(PLDHashTable* aTable, const void* aKey,
* shrink the table if it is underloaded. It does not update mStats #ifdef
* PL_DHASHMETER, either.
*/
NS_COM_GLUE void PL_DHashTableRawRemove(PLDHashTable* aTable,
PLDHashEntryHdr* aEntry);
void PL_DHashTableRawRemove(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
NS_COM_GLUE uint32_t
uint32_t
PL_DHashTableEnumerate(PLDHashTable* aTable, PLDHashEnumerator aEtor,
void* aArg);
@ -532,7 +527,7 @@ PL_DHashTableEnumerate(PLDHashTable* aTable, PLDHashEnumerator aEtor,
* pointed to by entries. Doesn't measure |ops| because it's often shared
* between tables, nor |data| because it's opaque.
*/
NS_COM_GLUE size_t PL_DHashTableSizeOfExcludingThis(
size_t PL_DHashTableSizeOfExcludingThis(
const PLDHashTable* aTable,
PLDHashSizeOfEntryExcludingThisFun aSizeOfEntryExcludingThis,
mozilla::MallocSizeOf aMallocSizeOf, void* aArg = nullptr);
@ -540,7 +535,7 @@ NS_COM_GLUE size_t PL_DHashTableSizeOfExcludingThis(
/**
* Like PL_DHashTableSizeOfExcludingThis, but includes sizeof(*this).
*/
NS_COM_GLUE size_t PL_DHashTableSizeOfIncludingThis(
size_t PL_DHashTableSizeOfIncludingThis(
const PLDHashTable* aTable,
PLDHashSizeOfEntryExcludingThisFun aSizeOfEntryExcludingThis,
mozilla::MallocSizeOf aMallocSizeOf, void* aArg = nullptr);
@ -560,12 +555,12 @@ NS_COM_GLUE size_t PL_DHashTableSizeOfIncludingThis(
* no longer trigger erroneously due to multi-threaded access. Instead,
* mutations will cause assertions.
*/
NS_COM_GLUE void PL_DHashMarkTableImmutable(PLDHashTable* aTable);
void PL_DHashMarkTableImmutable(PLDHashTable* aTable);
#endif
#ifdef PL_DHASHMETER
NS_COM_GLUE void PL_DHashTableDumpMeter(PLDHashTable* aTable,
PLDHashEnumerator aDump, FILE* aFp);
void PL_DHashTableDumpMeter(PLDHashTable* aTable,
PLDHashEnumerator aDump, FILE* aFp);
#endif
#endif /* pldhash_h___ */

Просмотреть файл

@ -15,11 +15,11 @@ namespace mozilla {
// Suppress GCC warnings about unused return values with
// unused << SomeFuncDeclaredWarnUnusedReturnValue();
//
struct NS_COM_GLUE unused_t
struct unused_t
{
};
extern const unused_t NS_COM_GLUE unused;
extern const unused_t unused;
template<typename T>
inline void