gecko/xpcom/base
Ehsan Akhgari ab697fda8e Bug 788014 - Part 1: Define nsrefcnt to be unsigned long unconditionally on Windows; r=jrmuizel
On Windows, IUknown::AddRef and IUnknown::Release are defined to
return ULONG, which is defined as unsigned long.  The existing
code relies on the PR_BYTES_PER_LONG macro which is #defined in
prtypes.h to always be 4 on Windows.  If we remove the prtypes.h
inclusion from nscore.h, in the places where prtypes.h is not
included by other things, we will fall into the other path in the
#ifdef condition which defines nsrefcnt to be unsigned int, which
causes the signature of AddRef and Release to change, which
results in linker errors.

There are a couple of reasons why this change is correct:

1. On both Win32 and Win64, the size of the long type is 4 bytes,
always.  And prtypes.h doesn't detect the size of longs, it just
assumes it, so this check is really a tautology.
2. If the size of the long type changes on Windows, sometime,
the return value of AddRef and Release on Windows should change
size as well in order to maintain binary compatibility with
IUnknown, and before this change, the code would fail to hold
that promise.

--HG--
extra : rebase_source : 8333582b494aaca17c91cf35287a084083219050
2012-09-07 15:09:01 -04:00
..
AvailableMemoryTracker.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
AvailableMemoryTracker.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
ClearOnShutdown.cpp
ClearOnShutdown.h Bug 772987 - Part 3: Update comment in ClearOnShutdown. r=glandium 2012-07-26 15:33:45 -04:00
dmd.h
FunctionTimer.cpp Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
FunctionTimer.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Makefile.in Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
MapsMemoryReporter.cpp Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
MapsMemoryReporter.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsAgg.h Bug 750570, part 3 - Remove unused stabilizeForDeletion argument. r=smaug 2012-08-24 09:50:06 -07:00
nsAllocator.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsAtomicRefcnt.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsAutoPtr.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsAutoRef.h Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
nsCom.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsConsoleMessage.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsConsoleMessage.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsConsoleService.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsConsoleService.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nscore.h Bug 788014 - Part 1: Define nsrefcnt to be unsigned long unconditionally on Windows; r=jrmuizel 2012-09-07 15:09:01 -04:00
nsCrashOnException.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsCrashOnException.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsCycleCollector.cpp Bug 785666 - Remove old-style CC Suspect and Forget functions. r=smaug,bsmedberg 2012-08-27 10:28:38 -07:00
nsCycleCollector.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsDebugImpl.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsDebugImpl.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsError.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsErrorService.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsErrorService.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsExceptionService.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsExceptionService.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsIAllocator.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIConsoleListener.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIConsoleMessage.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIConsoleService.idl Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsICycleCollectorListener.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIDebug2.idl Bug 763138: Telemetry should indicate whether a debugger is attached. r=bsmedberg,smichaud 2012-06-28 14:57:52 -04:00
nsIDebug.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIErrorService.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIException.idl Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsIExceptionService.idl Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsIID.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIInterfaceRequestor.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIMacUtils.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIMemory.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIMemoryReporter.idl Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsIMutable.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsInterfaceRequestorAgg.cpp Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (XPCOM parts); r=bsmedberg 2012-06-05 19:51:58 -04:00
nsInterfaceRequestorAgg.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIProgrammingLanguage.idl Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsISizeOf.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsISupports.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsISupportsBase.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsISupportsObsolete.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsITraceRefcnt.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIUUIDGenerator.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIVersionComparator.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsIWeakReference.idl Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsMacUtilsImpl.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsMacUtilsImpl.h Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (XPCOM parts); r=bsmedberg 2012-06-05 19:51:58 -04:00
nsMemoryImpl.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsMemoryImpl.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsMemoryReporterManager.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsMemoryReporterManager.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsObjCExceptions.h Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
nsrootidl.idl Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsSetDllDirectory.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsStackWalk.cpp Bug 783523 - Fix platform-specific nsresult misuse; r=ehsan,tbsaunde,smaug 2012-08-16 14:58:11 +03:00
nsStackWalk.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsStackWalkPrivate.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsSystemInfo.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsSystemInfo.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsTraceRefcntImpl.cpp Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
nsTraceRefcntImpl.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsUUIDGenerator.cpp Bug 783523 - Fix platform-specific nsresult misuse; r=ehsan,tbsaunde,smaug 2012-08-16 14:58:11 +03:00
nsUUIDGenerator.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsVersionComparatorImpl.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
nsVersionComparatorImpl.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsWeakPtr.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsWindowsHelpers.h Bug 774140 - Remove code duplication for IsVistaOrLater. r=bsmedberg 2012-07-25 10:23:26 -04:00
pure_api.c
pure.h
StackWalk.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
StaticPtr.h Bug 772987 - Part 1: Add Static{Auto,Ref}Ptr. r=bsmedberg 2012-07-26 15:33:45 -04:00
VisualEventTracer.cpp Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
VisualEventTracer.h Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00