diff --git a/mozilla/embedding/base/Makefile.in b/mozilla/embedding/base/Makefile.in index c964d389226..24d16080de1 100644 --- a/mozilla/embedding/base/Makefile.in +++ b/mozilla/embedding/base/Makefile.in @@ -1,3 +1,4 @@ +# vim:set ts=8 sw=8 sts=8 noet: # # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 diff --git a/mozilla/embedding/base/nsEmbedAPI.cpp b/mozilla/embedding/base/nsEmbedAPI.cpp index 2f363808250..87892e20fff 100644 --- a/mozilla/embedding/base/nsEmbedAPI.cpp +++ b/mozilla/embedding/base/nsEmbedAPI.cpp @@ -37,6 +37,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsIServiceManager.h" +#include "nsIComponentManager.h" #include "nsIComponentRegistrar.h" #include "nsIAppStartupNotifier.h" #include "nsIStringBundle.h" @@ -46,9 +47,6 @@ #include "nsXPCOM.h" #include "nsEmbedAPI.h" -#include "nsCOMPtr.h" -#include "nsComponentManagerUtils.h" -#include "nsIServiceManagerUtils.h" static nsIServiceManager *sServiceManager = nsnull; static PRBool sRegistryInitializedFlag = PR_FALSE; @@ -112,65 +110,87 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory, // Register components if (!sRegistryInitializedFlag) { - nsCOMPtr registrar = do_QueryInterface(sServiceManager, &rv); +#ifdef DEBUG + nsIComponentRegistrar *registrar; + rv = sServiceManager->QueryInterface(NS_GET_IID(nsIComponentRegistrar), + (void **) ®istrar); if (NS_FAILED(rv)) { NS_WARNING("Could not QI to registrar"); return rv; } -#ifdef DEBUG rv = registrar->AutoRegister(nsnull); - if (NS_FAILED(rv)) { NS_WARNING("Could not AutoRegister"); - return rv; } - - // If the application is using an GRE, then, - // auto register components in the GRE directory as well. - // - // The application indicates that it's using an GRE by - // returning a valid nsIFile when queried (via appFileLocProvider) - // for the NS_GRE_DIR atom as shown below - // - if (appFileLocProvider) + else { - nsCOMPtr greDir; - PRBool persistent = PR_TRUE; + // If the application is using an GRE, then, auto register components + // in the GRE directory as well. + // + // The application indicates that it's using an GRE by returning a + // valid nsIFile when queried (via appFileLocProvider) for the + // NS_GRE_DIR atom as shown below - appFileLocProvider->GetFile(NS_GRE_DIR, &persistent, getter_AddRefs(greDir)); - - if (greDir) + if (appFileLocProvider) { - rv = registrar->AutoRegister(greDir); - NS_ASSERTION(NS_SUCCEEDED(rv), "Could not AutoRegister GRE components"); + nsIFile *greDir = nsnull; + PRBool persistent = PR_TRUE; + + appFileLocProvider->GetFile(NS_GRE_DIR, &persistent, + &greDir); + if (greDir) + { + rv = registrar->AutoRegister(greDir); + if (NS_FAILED(rv)) + NS_WARNING("Could not AutoRegister GRE components"); + NS_RELEASE(greDir); + } } } + NS_RELEASE(registrar); + if (NS_FAILED(rv)) + return rv; #endif sRegistryInitializedFlag = PR_TRUE; } - nsCOMPtr mStartupNotifier = do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID, &rv); - if(NS_FAILED(rv)) - return rv; - mStartupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull); + nsIComponentManager *compMgr; + rv = sServiceManager->QueryInterface(NS_GET_IID(nsIComponentManager), + (void **) &compMgr); + if (NS_FAILED(rv)) + return rv; + + nsIObserver *startupNotifier; + rv = compMgr->CreateInstanceByContractID(NS_APPSTARTUPNOTIFIER_CONTRACTID, + NULL, + NS_GET_IID(nsIObserver), + (void **) &startupNotifier); + NS_RELEASE(compMgr); + if (NS_FAILED(rv)) + return rv; + + startupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull); + NS_RELEASE(startupNotifier); #ifdef HACK_AROUND_THREADING_ISSUES // XXX force certain objects to be created on the main thread - nsCOMPtr sBundleService; - sBundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); + nsIStringBundleService *bundleService; + rv = sServiceManager->GetServiceByContractID(NS_STRINGBUNDLE_CONTRACTID, + NS_GET_IID(nsIStringBundleService), + (void **) &bundleService); if (NS_SUCCEEDED(rv)) { - nsCOMPtr stringBundle; + nsIStringBundle *stringBundle; const char propertyURL[] = "chrome://necko/locale/necko.properties"; - rv = sBundleService->CreateBundle(propertyURL, - getter_AddRefs(stringBundle)); + rv = bundleService->CreateBundle(propertyURL, &stringBundle); + NS_RELEASE(stringBundle); + NS_RELEASE(bundleService); } #endif return NS_OK; - } nsresult NS_TermEmbedding() diff --git a/mozilla/xpcom/base/nscore.h b/mozilla/xpcom/base/nscore.h index dff2c254621..78197b7f2ce 100644 --- a/mozilla/xpcom/base/nscore.h +++ b/mozilla/xpcom/base/nscore.h @@ -238,6 +238,12 @@ #define NS_COM NS_IMPORT #endif +#ifdef MOZILLA_STRICT_API +#define NS_COM_GLUE +#else +#define NS_COM_GLUE NS_COM +#endif + /** * NS_NO_VTABLE is emitted by xpidl in interface declarations whenever diff --git a/mozilla/xpcom/build/Makefile.in b/mozilla/xpcom/build/Makefile.in index a22f84bf5fc..96a40d0d407 100644 --- a/mozilla/xpcom/build/Makefile.in +++ b/mozilla/xpcom/build/Makefile.in @@ -1,3 +1,4 @@ +# vim:set ts=8 sw=8 sts=8 noet: # # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -41,6 +42,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +include $(srcdir)/../glue/objs.mk MODULE = xpcom LIBRARY_NAME = xpcom_core @@ -67,7 +69,10 @@ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) REQUIRES += macmorefiles endif -CPPSRCS = nsXPComInit.cpp +CPPSRCS = \ + $(XPCOM_GLUE_SRC_LCSRCS) \ + nsXPComInit.cpp \ + $(NULL) ifeq ($(OS_ARCH),WINNT) CPPSRCS += dlldeps.cpp @@ -97,10 +102,10 @@ SHARED_LIBRARY_LIBS = \ $(DIST)/lib/$(LIB_PREFIX)xpt.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)xptcmd.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)string_s.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(NULL) LOCAL_INCLUDES = \ + -I$(srcdir) \ -I.. \ -I$(srcdir)/../glue \ -I$(srcdir)/../base \ @@ -132,6 +137,8 @@ FORCE_SHARED_LIB = 1 # UNIX98 iconv support OS_LIBS += $(LIBICONV) +GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(wildcard *.$(OBJ_SUFFIX)) + include $(topsrcdir)/config/rules.mk DEFINES += \ @@ -161,3 +168,6 @@ ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp) endif endif # WINNT + +export:: $(XPCOM_GLUE_SRC_CSRCS) + $(INSTALL) $^ . diff --git a/mozilla/xpcom/glue/Makefile.in b/mozilla/xpcom/glue/Makefile.in index a3b1f24d01d..e78e629de58 100644 --- a/mozilla/xpcom/glue/Makefile.in +++ b/mozilla/xpcom/glue/Makefile.in @@ -1,3 +1,4 @@ +# vim:set ts=8 sw=8 sts=8 noet: # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # @@ -82,5 +83,4 @@ include $(topsrcdir)/config/rules.mk export:: rm -f $(XPCOM_GLUE_SRC_CSRCS:.cpp=.$(OBJ_SUFFIX)) -DEFINES += \ - -D_IMPL_NS_COM +DEFINES += -DMOZILLA_STRICT_API diff --git a/mozilla/xpcom/glue/nsCOMPtr.h b/mozilla/xpcom/glue/nsCOMPtr.h index 6a60bc2552c..658eca1ca47 100644 --- a/mozilla/xpcom/glue/nsCOMPtr.h +++ b/mozilla/xpcom/glue/nsCOMPtr.h @@ -67,7 +67,7 @@ #ifndef nscore_h___ #include "nscore.h" - // for |NS_..._CAST|, |NS_COM| + // for |NS_..._CAST|, |NS_COM_GLUE| #endif @@ -341,7 +341,7 @@ class nsCOMPtr_helper warrant the specialcasing. */ -class NS_COM nsQueryInterface +class NS_COM_GLUE nsQueryInterface { public: explicit @@ -357,7 +357,7 @@ class NS_COM nsQueryInterface nsISupports* mRawPtr; }; -class NS_COM nsQueryInterfaceWithError +class NS_COM_GLUE nsQueryInterfaceWithError { public: nsQueryInterfaceWithError( nsISupports* aRawPtr, nsresult* error ) @@ -432,13 +432,13 @@ class nsCOMPtr_base // nothing else to do here } - NS_COM NS_FASTCALL ~nsCOMPtr_base(); + NS_COM_GLUE NS_FASTCALL ~nsCOMPtr_base(); - NS_COM void NS_FASTCALL assign_with_AddRef( nsISupports* ); - NS_COM void NS_FASTCALL assign_from_qi( const nsQueryInterface, const nsIID& ); - NS_COM void NS_FASTCALL assign_from_qi_with_error( const nsQueryInterfaceWithError&, const nsIID& ); - NS_COM void NS_FASTCALL assign_from_helper( const nsCOMPtr_helper&, const nsIID& ); - NS_COM void** NS_FASTCALL begin_assignment(); + NS_COM_GLUE void NS_FASTCALL assign_with_AddRef( nsISupports* ); + NS_COM_GLUE void NS_FASTCALL assign_from_qi( const nsQueryInterface, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_qi_with_error( const nsQueryInterfaceWithError&, const nsIID& ); + NS_COM_GLUE void NS_FASTCALL assign_from_helper( const nsCOMPtr_helper&, const nsIID& ); + NS_COM_GLUE void** NS_FASTCALL begin_assignment(); protected: NS_MAY_ALIAS_PTR(nsISupports) mRawPtr; diff --git a/mozilla/xpcom/glue/nsDebug.cpp b/mozilla/xpcom/glue/nsDebug.cpp index 477ee3d15f8..cc1b3f978fa 100644 --- a/mozilla/xpcom/glue/nsDebug.cpp +++ b/mozilla/xpcom/glue/nsDebug.cpp @@ -75,7 +75,7 @@ void GlueShutdownDebug() } #endif -NS_COM void nsDebug::Abort(const char* aFile, PRIntn aLine) +NS_COM_GLUE void nsDebug::Abort(const char* aFile, PRIntn aLine) { if (!ENSURE_DEBUGOBJECT) return; @@ -83,7 +83,7 @@ NS_COM void nsDebug::Abort(const char* aFile, PRIntn aLine) gDebugObject->Abort(aFile, aLine); } -NS_COM void nsDebug::Break(const char* aFile, PRIntn aLine) +NS_COM_GLUE void nsDebug::Break(const char* aFile, PRIntn aLine) { if (!ENSURE_DEBUGOBJECT) return; @@ -91,7 +91,7 @@ NS_COM void nsDebug::Break(const char* aFile, PRIntn aLine) gDebugObject->Break(aFile, aLine); } -NS_COM void nsDebug::Warning(const char* aStr, +NS_COM_GLUE void nsDebug::Warning(const char* aStr, const char* aFile, PRIntn aLine) { @@ -100,7 +100,7 @@ NS_COM void nsDebug::Warning(const char* aStr, gDebugObject->Warning(aStr, aFile, aLine); } -NS_COM void nsDebug::Assertion(const char* aStr, const char* aExpr, +NS_COM_GLUE void nsDebug::Assertion(const char* aStr, const char* aExpr, const char* aFile, PRIntn aLine) { if (!ENSURE_DEBUGOBJECT) diff --git a/mozilla/xpcom/glue/nsDebug.h b/mozilla/xpcom/glue/nsDebug.h index f2ed4c56b1f..b98ce6be23f 100644 --- a/mozilla/xpcom/glue/nsDebug.h +++ b/mozilla/xpcom/glue/nsDebug.h @@ -65,23 +65,23 @@ public: /** * Log a warning message to the debug log. */ - static NS_COM void Warning(const char* aMessage, + static NS_COM_GLUE void Warning(const char* aMessage, const char* aFile, PRIntn aLine); /** * Abort the executing program. This works on all architectures. */ - static NS_COM void Abort(const char* aFile, PRIntn aLine); + static NS_COM_GLUE void Abort(const char* aFile, PRIntn aLine); /** * Break the executing program into the debugger. */ - static NS_COM void Break(const char* aFile, PRIntn aLine); + static NS_COM_GLUE void Break(const char* aFile, PRIntn aLine); /** * Log an assertion message to the debug log */ - static NS_COM void Assertion(const char* aStr, const char* aExpr, + static NS_COM_GLUE void Assertion(const char* aStr, const char* aExpr, const char* aFile, PRIntn aLine); }; diff --git a/mozilla/xpcom/glue/nsGenericFactory.cpp b/mozilla/xpcom/glue/nsGenericFactory.cpp index 2d791943407..fa814db6d7f 100644 --- a/mozilla/xpcom/glue/nsGenericFactory.cpp +++ b/mozilla/xpcom/glue/nsGenericFactory.cpp @@ -200,7 +200,7 @@ NS_METHOD nsGenericFactory::Create(nsISupports* outer, const nsIID& aIID, void* return res; } -NS_COM nsresult +NS_COM_GLUE nsresult NS_NewGenericFactory(nsIGenericFactory* *result, const nsModuleComponentInfo *info) { @@ -506,7 +506,7 @@ nsGenericModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *okToUnload) return NS_ERROR_FAILURE; } -NS_COM nsresult +NS_COM_GLUE nsresult NS_NewGenericModule2(nsModuleInfo* info, nsIModule* *result) { nsresult rv = NS_OK; @@ -524,7 +524,7 @@ NS_NewGenericModule2(nsModuleInfo* info, nsIModule* *result) return rv; } -NS_COM nsresult +NS_COM_GLUE nsresult NS_NewGenericModule(const char* moduleName, PRUint32 componentCount, nsModuleComponentInfo* components, diff --git a/mozilla/xpcom/glue/nsIGenericFactory.h b/mozilla/xpcom/glue/nsIGenericFactory.h index 9e852082d3d..626c2e1aafa 100644 --- a/mozilla/xpcom/glue/nsIGenericFactory.h +++ b/mozilla/xpcom/glue/nsIGenericFactory.h @@ -72,7 +72,7 @@ public: NS_IMETHOD GetComponentInfo(const nsModuleComponentInfo **infop) = 0; }; -NS_COM nsresult +NS_COM_GLUE nsresult NS_NewGenericFactory(nsIGenericFactory **result, const nsModuleComponentInfo *info); @@ -306,13 +306,13 @@ struct nsModuleInfo { * Create a new generic module. Use the NS_IMPL_NSGETMODULE macro, or * one of its relatives, rather than using this directly. */ -NS_COM nsresult +NS_COM_GLUE nsresult NS_NewGenericModule2(nsModuleInfo *info, nsIModule* *result); /** * Obsolete. Use NS_NewGenericModule2() instead. */ -NS_COM nsresult +NS_COM_GLUE nsresult NS_NewGenericModule(const char* moduleName, PRUint32 componentCount, nsModuleComponentInfo* components, diff --git a/mozilla/xpcom/glue/nsIInterfaceRequestorUtils.h b/mozilla/xpcom/glue/nsIInterfaceRequestorUtils.h index 7a635158e7a..2a4c0a8c8a8 100644 --- a/mozilla/xpcom/glue/nsIInterfaceRequestorUtils.h +++ b/mozilla/xpcom/glue/nsIInterfaceRequestorUtils.h @@ -55,7 +55,7 @@ CallGetInterface( T* aSource, DestinationType** aDestination ) NS_REINTERPRET_CAST(void**, aDestination)); } -class NS_COM nsGetInterface : public nsCOMPtr_helper +class NS_COM_GLUE nsGetInterface : public nsCOMPtr_helper { public: nsGetInterface( nsISupports* aSource, nsresult* error ) diff --git a/mozilla/xpcom/glue/nsIWeakReferenceUtils.h b/mozilla/xpcom/glue/nsIWeakReferenceUtils.h index 17d1bd796ea..1bae0556f5c 100644 --- a/mozilla/xpcom/glue/nsIWeakReferenceUtils.h +++ b/mozilla/xpcom/glue/nsIWeakReferenceUtils.h @@ -64,7 +64,7 @@ CallQueryReferent( T* aSource, DestinationType** aDestination ) } -class NS_COM nsQueryReferent : public nsCOMPtr_helper +class NS_COM_GLUE nsQueryReferent : public nsCOMPtr_helper { public: nsQueryReferent( nsIWeakReference* aWeakPtr, nsresult* error ) @@ -90,7 +90,7 @@ do_QueryReferent( nsIWeakReference* aRawPtr, nsresult* error = 0 ) -class NS_COM nsGetWeakReference : public nsCOMPtr_helper +class NS_COM_GLUE nsGetWeakReference : public nsCOMPtr_helper { public: nsGetWeakReference( nsISupports* aRawPtr, nsresult* error ) @@ -155,7 +155,7 @@ do_GetWeakReference( already_AddRefed&, nsresult* ) /** * Deprecated, use |do_GetWeakReference| instead. */ -extern NS_COM +extern NS_COM_GLUE nsIWeakReference* NS_GetWeakReference( nsISupports* , nsresult* aResult=0 ); diff --git a/mozilla/xpcom/glue/nsMemory.cpp b/mozilla/xpcom/glue/nsMemory.cpp index ec578668346..45661026b41 100644 --- a/mozilla/xpcom/glue/nsMemory.cpp +++ b/mozilla/xpcom/glue/nsMemory.cpp @@ -80,7 +80,7 @@ void GlueShutdownMemory() //////////////////////////////////////////////////////////////////////////////// // nsMemory static helper routines -NS_COM void* +NS_COM_GLUE void* nsMemory::Alloc(PRSize size) { if (!ENSURE_ALLOCATOR) @@ -89,7 +89,7 @@ nsMemory::Alloc(PRSize size) return gMemory->Alloc(size); } -NS_COM void* +NS_COM_GLUE void* nsMemory::Realloc(void* ptr, PRSize size) { if (!ENSURE_ALLOCATOR) @@ -98,7 +98,7 @@ nsMemory::Realloc(void* ptr, PRSize size) return gMemory->Realloc(ptr, size); } -NS_COM void +NS_COM_GLUE void nsMemory::Free(void* ptr) { if (!ENSURE_ALLOCATOR) @@ -107,7 +107,7 @@ nsMemory::Free(void* ptr) gMemory->Free(ptr); } -NS_COM nsresult +NS_COM_GLUE nsresult nsMemory::HeapMinimize(PRBool aImmediate) { if (!ENSURE_ALLOCATOR) @@ -116,7 +116,7 @@ nsMemory::HeapMinimize(PRBool aImmediate) return gMemory->HeapMinimize(aImmediate); } -NS_COM void* +NS_COM_GLUE void* nsMemory::Clone(const void* ptr, PRSize size) { if (!ENSURE_ALLOCATOR) @@ -128,7 +128,7 @@ nsMemory::Clone(const void* ptr, PRSize size) return newPtr; } -NS_COM nsIMemory* +NS_COM_GLUE nsIMemory* nsMemory::GetGlobalMemoryService() { if (!ENSURE_ALLOCATOR) diff --git a/mozilla/xpcom/glue/nsMemory.h b/mozilla/xpcom/glue/nsMemory.h index 4ee48bf02dc..aae912ea31b 100644 --- a/mozilla/xpcom/glue/nsMemory.h +++ b/mozilla/xpcom/glue/nsMemory.h @@ -63,12 +63,12 @@ class nsMemory { public: - static NS_COM void* Alloc(size_t size); - static NS_COM void* Realloc(void* ptr, size_t size); - static NS_COM void Free(void* ptr); - static NS_COM nsresult HeapMinimize(PRBool aImmediate); - static NS_COM void* Clone(const void* ptr, size_t size); - static NS_COM nsIMemory* GetGlobalMemoryService(); // AddRefs + static NS_COM_GLUE void* Alloc(size_t size); + static NS_COM_GLUE void* Realloc(void* ptr, size_t size); + static NS_COM_GLUE void Free(void* ptr); + static NS_COM_GLUE nsresult HeapMinimize(PRBool aImmediate); + static NS_COM_GLUE void* Clone(const void* ptr, size_t size); + static NS_COM_GLUE nsIMemory* GetGlobalMemoryService(); // AddRefs }; /** diff --git a/mozilla/xpcom/glue/nsTraceRefcnt.cpp b/mozilla/xpcom/glue/nsTraceRefcnt.cpp index 14e9469b16d..6c8da5be321 100644 --- a/mozilla/xpcom/glue/nsTraceRefcnt.cpp +++ b/mozilla/xpcom/glue/nsTraceRefcnt.cpp @@ -75,7 +75,7 @@ void GlueShutdownTraceRefcnt() } #endif -NS_COM void +NS_COM_GLUE void nsTraceRefcnt::LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName, PRUint32 aInstanceSize) { if (!ENSURE_TRACEOBJECT) @@ -83,7 +83,7 @@ nsTraceRefcnt::LogAddRef(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName gTraceRefcntObject->LogAddRef(aPtr, aNewRefcnt, aTypeName, aInstanceSize); } -NS_COM void +NS_COM_GLUE void nsTraceRefcnt::LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeName) { if (!ENSURE_TRACEOBJECT) @@ -91,7 +91,7 @@ nsTraceRefcnt::LogRelease(void * aPtr, nsrefcnt aNewRefcnt, const char *aTypeNam gTraceRefcntObject->LogRelease(aPtr, aNewRefcnt, aTypeName); } -NS_COM void +NS_COM_GLUE void nsTraceRefcnt::LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { if (!ENSURE_TRACEOBJECT) @@ -99,7 +99,7 @@ nsTraceRefcnt::LogCtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSiz gTraceRefcntObject->LogCtor(aPtr, aTypeName, aInstanceSize); } -NS_COM void +NS_COM_GLUE void nsTraceRefcnt::LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSize) { if (!ENSURE_TRACEOBJECT) @@ -107,7 +107,7 @@ nsTraceRefcnt::LogDtor(void * aPtr, const char *aTypeName, PRUint32 aInstanceSiz gTraceRefcntObject->LogDtor(aPtr, aTypeName, aInstanceSize); } -NS_COM void +NS_COM_GLUE void nsTraceRefcnt::LogAddCOMPtr(void * aPtr, nsISupports *aObject) { if (!ENSURE_TRACEOBJECT) @@ -115,7 +115,7 @@ nsTraceRefcnt::LogAddCOMPtr(void * aPtr, nsISupports *aObject) gTraceRefcntObject->LogAddCOMPtr(aPtr, aObject); } -NS_COM void +NS_COM_GLUE void nsTraceRefcnt::LogReleaseCOMPtr(void * aPtr, nsISupports *aObject) { if (!ENSURE_TRACEOBJECT) diff --git a/mozilla/xpcom/glue/nsTraceRefcnt.h b/mozilla/xpcom/glue/nsTraceRefcnt.h index afafda4b83b..565704cbd92 100644 --- a/mozilla/xpcom/glue/nsTraceRefcnt.h +++ b/mozilla/xpcom/glue/nsTraceRefcnt.h @@ -112,24 +112,24 @@ PR_END_MACRO */ class nsTraceRefcnt { public: - static NS_COM void LogAddRef(void* aPtr, - nsrefcnt aNewRefCnt, - const char* aTypeName, - PRUint32 aInstanceSize); + static NS_COM_GLUE void LogAddRef(void* aPtr, + nsrefcnt aNewRefCnt, + const char* aTypeName, + PRUint32 aInstanceSize); - static NS_COM void LogRelease(void* aPtr, - nsrefcnt aNewRefCnt, - const char* aTypeName); + static NS_COM_GLUE void LogRelease(void* aPtr, + nsrefcnt aNewRefCnt, + const char* aTypeName); - static NS_COM void LogCtor(void* aPtr, const char* aTypeName, - PRUint32 aInstanceSize); + static NS_COM_GLUE void LogCtor(void* aPtr, const char* aTypeName, + PRUint32 aInstanceSize); - static NS_COM void LogDtor(void* aPtr, const char* aTypeName, - PRUint32 aInstanceSize); + static NS_COM_GLUE void LogDtor(void* aPtr, const char* aTypeName, + PRUint32 aInstanceSize); - static NS_COM void LogAddCOMPtr(void *aCOMPtr, nsISupports *aObject); + static NS_COM_GLUE void LogAddCOMPtr(void *aCOMPtr, nsISupports *aObject); - static NS_COM void LogReleaseCOMPtr(void *aCOMPtr, nsISupports *aObject); + static NS_COM_GLUE void LogReleaseCOMPtr(void *aCOMPtr, nsISupports *aObject); }; #endif /* nsTraceRefcnt_h___ */ diff --git a/mozilla/xpcom/glue/nsWeakReference.cpp b/mozilla/xpcom/glue/nsWeakReference.cpp index 76d9f593482..7e07d54e802 100644 --- a/mozilla/xpcom/glue/nsWeakReference.cpp +++ b/mozilla/xpcom/glue/nsWeakReference.cpp @@ -88,7 +88,7 @@ nsGetWeakReference::operator()( const nsIID&, void** aResult ) const } -NS_COM nsIWeakReference* // or else |already_AddRefed| +NS_COM_GLUE nsIWeakReference* // or else |already_AddRefed| NS_GetWeakReference( nsISupports* aInstancePtr, nsresult* aErrorPtr ) { void* result = 0; @@ -96,7 +96,7 @@ NS_GetWeakReference( nsISupports* aInstancePtr, nsresult* aErrorPtr ) return NS_STATIC_CAST(nsIWeakReference*, result); } -NS_COM nsresult +NS_COM_GLUE nsresult nsSupportsWeakReference::GetWeakReference( nsIWeakReference** aInstancePtr ) { if ( !aInstancePtr ) diff --git a/mozilla/xpcom/glue/nsWeakReference.h b/mozilla/xpcom/glue/nsWeakReference.h index 27e778ef1e9..12e0a518dbe 100644 --- a/mozilla/xpcom/glue/nsWeakReference.h +++ b/mozilla/xpcom/glue/nsWeakReference.h @@ -50,7 +50,7 @@ class nsWeakReference; #undef IMETHOD_VISIBILITY #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT -class NS_COM nsSupportsWeakReference : public nsISupportsWeakReference +class NS_COM_GLUE nsSupportsWeakReference : public nsISupportsWeakReference { public: nsSupportsWeakReference() @@ -85,7 +85,7 @@ class NS_COM nsSupportsWeakReference : public nsISupportsWeakReference #undef IMETHOD_VISIBILITY #define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN -class NS_COM nsWeakReference : public nsIWeakReference +class NS_COM_GLUE nsWeakReference : public nsIWeakReference { public: // nsISupports... diff --git a/mozilla/xpcom/glue/standalone/Makefile.in b/mozilla/xpcom/glue/standalone/Makefile.in index 9bb88b270d1..11d9fa39216 100644 --- a/mozilla/xpcom/glue/standalone/Makefile.in +++ b/mozilla/xpcom/glue/standalone/Makefile.in @@ -1,3 +1,4 @@ +# vim:set ts=8 sw=8 sts=8 noet: # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # @@ -74,10 +75,6 @@ FORCE_USE_PIC = 1 GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(wildcard *.$(OBJ_SUFFIX)) -ifeq ($(OS_ARCH),WINNT) -GARBAGE += $(addprefix $(srcdir)/,$(XPCOM_GLUE_SRC_LCSRCS)) -endif - SRCS_IN_OBJDIR = 1 include $(topsrcdir)/config/rules.mk