Skip to content

Commit 347a7c2

Browse files
committed
Bug 852950 - Kill libxpcom. r=bsmedberg
Also refactored the xpcom standalone glue to reside in a single file and removed its use of realpath(). --HG-- rename : xpcom/stub/dependentlibs.py => toolkit/library/dependentlibs.py rename : xpcom/stub/nsXPComStub.cpp => xpcom/build/FrozenFunctions.cpp
1 parent 8376bad commit 347a7c2

File tree

64 files changed

+760
-1713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+760
-1713
lines changed

b2g/installer/package-manifest.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
5555
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
5656
#endif
57-
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
5857
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
5958
#ifdef MOZ_DMD
6059
@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@

b2g/installer/removed-files.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ components/dom_sms.xpt
2020
@DLL_PREFIX@nssutil3@DLL_SUFFIX@
2121
@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
2222
#endif
23+
@DLL_PREFIX@xpcom@DLL_SUFFIX@

browser/installer/package-manifest.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
7070
#endif
7171
#endif
72-
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
7372
#ifdef XP_MACOSX
7473
@BINPATH@/XUL
7574
#else

browser/installer/removed-files.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
@DLL_PREFIX@nssutil3@DLL_SUFFIX@
2727
@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
2828
#endif
29+
@DLL_PREFIX@xpcom@DLL_SUFFIX@
2930
LICENSE
3031
browserconfig.properties
3132
chrome/US.jar

configure.in

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,10 +1019,10 @@ MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/media/libpng)'
10191019

10201020
MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(LIBXUL_DIST)/lib)'
10211021
MOZ_JS_SHARED_LIBS='$(call EXPAND_LIBNAME_PATH,mozjs,$(LIBXUL_DIST)/lib)'
1022-
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxpcom -lxpcom_core -lmozalloc'
1022+
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/bin -lxul -lxpcom_core -lmozalloc'
10231023
MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
1024-
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxpcom -lmozalloc'
1025-
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
1024+
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/bin -lxul -lmozalloc'
1025+
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS)'
10261026
XPCOM_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
10271027
XPCOM_STANDALONE_GLUE_LDOPTS='$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX)'
10281028

@@ -2116,8 +2116,8 @@ ia64*-hpux*)
21162116
# mingw doesn't require kernel32, user32, and advapi32 explicitly
21172117
LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32 -lnetapi32"
21182118
MOZ_FIX_LINK_PATHS=
2119-
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxpcom -lxpcom_core -lmozalloc'
2120-
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxpcom -lmozalloc'
2119+
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib -lxul -lxpcom_core -lmozalloc'
2120+
XPCOM_FROZEN_LDOPTS='-L$(LIBXUL_DIST)/lib -lxul -lmozalloc'
21212121
DLL_PREFIX=
21222122
IMPORT_LIB_SUFFIX=dll.a
21232123

@@ -2182,9 +2182,9 @@ ia64*-hpux*)
21822182
WARNINGS_AS_ERRORS='-WX'
21832183
MOZ_OPTIMIZE_FLAGS='-O1'
21842184
MOZ_FIX_LINK_PATHS=
2185-
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2186-
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2187-
LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2185+
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2186+
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2187+
LIBXUL_LIBS='$(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
21882188
MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
21892189
LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
21902190
dnl For profile-guided optimization
@@ -2360,8 +2360,8 @@ ia64*-hpux*)
23602360
MOZ_DEBUG_FLAGS="-g -fno-inline"
23612361
MOZ_OPTIMIZE_FLAGS="-O2"
23622362
MOZ_OPTIMIZE_LDFLAGS="-s -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA"
2363-
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2364-
LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2363+
DYNAMIC_XPCOM_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/xpcom_core.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
2364+
LIBXUL_LIBS='-L$(LIBXUL_DIST)/lib $(LIBXUL_DIST)/lib/xul.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
23652365
TARGET_MD_ARCH=os2
23662366
_PLATFORM_DEFAULT_TOOLKIT="cairo-os2"
23672367
RC=rc.exe
@@ -4596,7 +4596,8 @@ cairo-cocoa)
45964596
TK_CFLAGS="-DNO_X11"
45974597
CFLAGS="$CFLAGS $TK_CFLAGS"
45984598
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
4599-
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
4599+
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/bin/XUL -lxpcom_core -lmozalloc'
4600+
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/bin/XUL -lmozalloc'
46004601
MOZ_USER_DIR="Mozilla"
46014602
MOZ_FS_LAYOUT=bundle
46024603
MOZ_WEBGL=1
@@ -4611,7 +4612,8 @@ cairo-uikit)
46114612
TK_LIBS='-framework Foundation -framework CoreFoundation -framework CoreGraphics -framework CoreText'
46124613
CFLAGS="$CFLAGS $TK_CFLAGS"
46134614
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
4614-
LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) $(LIBXUL_DIST)/bin/XUL'
4615+
DYNAMIC_XPCOM_LIBS='$(LIBXUL_DIST)/bin/XUL -lxpcom_core -lmozalloc'
4616+
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/bin/XUL -lmozalloc'
46154617
MOZ_USER_DIR="Mozilla"
46164618
MOZ_FS_LAYOUT=bundle
46174619
;;

mobile/android/installer/package-manifest.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
4141
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
4242
#endif
43-
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
4443
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
4544
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
4645
@BINPATH@/@DLL_PREFIX@omxplugin@DLL_SUFFIX@

mozglue/android/APKOpen.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,9 @@ loadGeckoLibs(const char *apkName)
224224
file_ids = (char *)extractBuf("lib.id", zip);
225225
#endif
226226

227-
char *file = new char[strlen(apkName) + sizeof("!/libxpcom.so")];
228-
sprintf(file, "%s!/libxpcom.so", apkName);
229-
__wrap_dlopen(file, RTLD_GLOBAL | RTLD_LAZY);
230-
// libxul.so is pulled from libxpcom.so, so we don't need to give the full path
231-
xul_handle = __wrap_dlopen("libxul.so", RTLD_GLOBAL | RTLD_LAZY);
227+
char *file = new char[strlen(apkName) + sizeof("!/libxul.so")];
228+
sprintf(file, "%s!/libxul.so", apkName);
229+
xul_handle = __wrap_dlopen(file, RTLD_GLOBAL | RTLD_LAZY);
232230
delete[] file;
233231

234232
#ifdef MOZ_CRASHREPORTER

toolkit/library/Makefile.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,3 +689,8 @@ ifeq (WINNT_1,$(OS_TARGET)_$(MOZ_PROFILE_USE))
689689
# Wrap linker to measure peak virtual memory usage.
690690
LD := $(PYTHON) $(topsrcdir)/build/link.py $(CURDIR)/linker-vsize $(LD)
691691
endif
692+
693+
libs:: $(FINAL_TARGET)/dependentlibs.list
694+
695+
$(FINAL_TARGET)/dependentlibs.list: dependentlibs.py $(SHARED_LIBRARY) $(wildcard $(if $(wildcard $(FINAL_TARGET)/dependentlibs.list),$(addprefix $(FINAL_TARGET)/,$(shell cat $(FINAL_TARGET)/dependentlibs.list))))
696+
$(PYTHON) $< $(SHARED_LIBRARY) -L $(FINAL_TARGET) $(if $(TOOLCHAIN_PREFIX),$(addprefix -p ,$(TOOLCHAIN_PREFIX))) > $@

xpcom/stub/dependentlibs.py renamed to toolkit/library/dependentlibs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

55
'''Given a library, dependentlibs.py prints the list of libraries it depends
6-
upon that are in the same directory.
6+
upon that are in the same directory, followed by the library itself.
77
'''
88

99
from optparse import OptionParser
@@ -92,7 +92,7 @@ def dependentlibs_otool(lib):
9292

9393
def dependentlibs(lib, libpaths, func):
9494
'''For a given library, returns the list of recursive dependencies that can
95-
be found in the given list of paths'''
95+
be found in the given list of paths, followed by the library itself.'''
9696
assert(libpaths)
9797
assert(isinstance(libpaths, list))
9898
deps = []
@@ -129,7 +129,7 @@ def main():
129129
if not options.libpaths:
130130
options.libpaths = [os.path.dirname(lib)]
131131

132-
print '\n'.join(dependentlibs(lib, options.libpaths, func))
132+
print '\n'.join(dependentlibs(lib, options.libpaths, func) + [lib])
133133

134134
if __name__ == '__main__':
135135
main()

toolkit/toolkit.mozbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ add_tier_dir('platform', app_libxul_dirs)
207207
add_tier_dir('platform', app_libxul_static_dirs, static=True)
208208

209209
add_tier_dir('platform', 'toolkit/library')
210-
add_tier_dir('platform', 'xpcom/stub')
211210

212211
if CONFIG['MOZ_REPLACE_MALLOC']:
213212
add_tier_dir('platform', 'memory/replace')

xpcom/build/FrozenFunctions.cpp

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
#include "nsXPCOM.h"
6+
#include "nsXPCOMPrivate.h"
7+
#include "nsXPCOMStrings.h"
8+
#include "xptcall.h"
9+
10+
#include <string.h>
11+
12+
/**
13+
* Private Method to register an exit routine. This method
14+
* used to allow you to setup a callback that will be called from
15+
* the NS_ShutdownXPCOM function after all services and
16+
* components have gone away. It was fatally flawed in that the component
17+
* DLL could be released before the exit function was called; it is now a
18+
* stub implementation that does nothing.
19+
*/
20+
XPCOM_API(nsresult)
21+
NS_RegisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine, uint32_t priority);
22+
23+
XPCOM_API(nsresult)
24+
NS_UnregisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine);
25+
26+
static const XPCOMFunctions kFrozenFunctions = {
27+
XPCOM_GLUE_VERSION,
28+
sizeof(XPCOMFunctions),
29+
&NS_InitXPCOM2,
30+
&NS_ShutdownXPCOM,
31+
&NS_GetServiceManager,
32+
&NS_GetComponentManager,
33+
&NS_GetComponentRegistrar,
34+
&NS_GetMemoryManager,
35+
&NS_NewLocalFile,
36+
&NS_NewNativeLocalFile,
37+
&NS_RegisterXPCOMExitRoutine,
38+
&NS_UnregisterXPCOMExitRoutine,
39+
40+
// these functions were added post 1.4
41+
&NS_GetDebug,
42+
&NS_GetTraceRefcnt,
43+
44+
// these functions were added post 1.6
45+
&NS_StringContainerInit,
46+
&NS_StringContainerFinish,
47+
&NS_StringGetData,
48+
&NS_StringSetData,
49+
&NS_StringSetDataRange,
50+
&NS_StringCopy,
51+
&NS_CStringContainerInit,
52+
&NS_CStringContainerFinish,
53+
&NS_CStringGetData,
54+
&NS_CStringSetData,
55+
&NS_CStringSetDataRange,
56+
&NS_CStringCopy,
57+
&NS_CStringToUTF16,
58+
&NS_UTF16ToCString,
59+
&NS_StringCloneData,
60+
&NS_CStringCloneData,
61+
62+
// these functions were added post 1.7 (post Firefox 1.0)
63+
&NS_Alloc,
64+
&NS_Realloc,
65+
&NS_Free,
66+
&NS_StringContainerInit2,
67+
&NS_CStringContainerInit2,
68+
&NS_StringGetMutableData,
69+
&NS_CStringGetMutableData,
70+
NULL,
71+
72+
// these functions were added post 1.8
73+
&NS_DebugBreak,
74+
&NS_LogInit,
75+
&NS_LogTerm,
76+
&NS_LogAddRef,
77+
&NS_LogRelease,
78+
&NS_LogCtor,
79+
&NS_LogDtor,
80+
&NS_LogCOMPtrAddRef,
81+
&NS_LogCOMPtrRelease,
82+
&NS_GetXPTCallStub,
83+
&NS_DestroyXPTCallStub,
84+
&NS_InvokeByIndex,
85+
nullptr,
86+
nullptr,
87+
&NS_StringSetIsVoid,
88+
&NS_StringGetIsVoid,
89+
&NS_CStringSetIsVoid,
90+
&NS_CStringGetIsVoid,
91+
92+
// these functions were added post 1.9
93+
&NS_CycleCollectorSuspect2,
94+
&NS_CycleCollectorForget2
95+
};
96+
97+
EXPORT_XPCOM_API(nsresult)
98+
NS_GetFrozenFunctions(XPCOMFunctions *functions, const char* /* libraryPath */)
99+
{
100+
if (!functions)
101+
return NS_ERROR_OUT_OF_MEMORY;
102+
103+
if (functions->version != XPCOM_GLUE_VERSION)
104+
return NS_ERROR_FAILURE;
105+
106+
uint32_t size = functions->size;
107+
if (size > sizeof(XPCOMFunctions))
108+
size = sizeof(XPCOMFunctions);
109+
110+
size -= offsetof(XPCOMFunctions, init);
111+
112+
memcpy(&functions->init, &kFrozenFunctions.init, size);
113+
114+
return NS_OK;
115+
}
116+
117+
/*
118+
* Stubs for nsXPCOMPrivate.h
119+
*/
120+
121+
EXPORT_XPCOM_API(nsresult)
122+
NS_RegisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine, uint32_t priority)
123+
{
124+
return NS_OK;
125+
}
126+
127+
EXPORT_XPCOM_API(nsresult)
128+
NS_UnregisterXPCOMExitRoutine(XPCOMExitRoutine exitRoutine)
129+
{
130+
return NS_OK;
131+
}

xpcom/build/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ CPPSRCS = \
3737
Services.cpp \
3838
Omnijar.cpp \
3939
FileLocation.cpp \
40+
FrozenFunctions.cpp \
4041
$(NULL)
4142

4243
ifeq (Darwin, $(OS_ARCH))

xpcom/build/nsXPCOM.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,6 @@
66
#ifndef nsXPCOM_h__
77
#define nsXPCOM_h__
88

9-
/* Map frozen functions to private symbol names if not using strict API. */
10-
#ifdef MOZILLA_INTERNAL_API
11-
# define NS_InitXPCOM2 NS_InitXPCOM2_P
12-
# define NS_ShutdownXPCOM NS_ShutdownXPCOM_P
13-
# define NS_GetServiceManager NS_GetServiceManager_P
14-
# define NS_GetComponentManager NS_GetComponentManager_P
15-
# define NS_GetComponentRegistrar NS_GetComponentRegistrar_P
16-
# define NS_GetMemoryManager NS_GetMemoryManager_P
17-
# define NS_NewLocalFile NS_NewLocalFile_P
18-
# define NS_NewNativeLocalFile NS_NewNativeLocalFile_P
19-
# define NS_GetDebug NS_GetDebug_P
20-
# define NS_GetTraceRefcnt NS_GetTraceRefcnt_P
21-
# define NS_Alloc NS_Alloc_P
22-
# define NS_Realloc NS_Realloc_P
23-
# define NS_Free NS_Free_P
24-
# define NS_DebugBreak NS_DebugBreak_P
25-
# define NS_LogInit NS_LogInit_P
26-
# define NS_LogTerm NS_LogTerm_P
27-
# define NS_LogAddRef NS_LogAddRef_P
28-
# define NS_LogRelease NS_LogRelease_P
29-
# define NS_LogCtor NS_LogCtor_P
30-
# define NS_LogDtor NS_LogDtor_P
31-
# define NS_LogCOMPtrAddRef NS_LogCOMPtrAddRef_P
32-
# define NS_LogCOMPtrRelease NS_LogCOMPtrRelease_P
33-
# define NS_CycleCollectorSuspect2 NS_CycleCollectorSuspect2_P
34-
# define NS_CycleCollectorForget2 NS_CycleCollectorForget2_P
35-
#endif
36-
379
#include "nscore.h"
3810
#include "nsXPCOMCID.h"
3911

xpcom/build/nsXPCOMPrivate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,15 @@ void LogTerm();
217217
#define XPCOM_SEARCH_KEY "PATH"
218218
#define GRE_CONF_NAME "gre.config"
219219
#define GRE_WIN_REG_LOC L"Software\\mozilla.org\\GRE"
220-
#define XPCOM_DLL "xpcom.dll"
221-
#define LXPCOM_DLL L"xpcom.dll"
220+
#define XPCOM_DLL XUL_DLL
221+
#define LXPCOM_DLL LXUL_DLL
222222
#define XUL_DLL "xul.dll"
223223
#define LXUL_DLL L"xul.dll"
224224

225225
#else // Unix
226226
#include <limits.h> // for PATH_MAX
227227

228-
#define XPCOM_DLL "libxpcom" MOZ_DLL_SUFFIX
228+
#define XPCOM_DLL XUL_DLL
229229

230230
// you have to love apple..
231231
#ifdef XP_MACOSX

xpcom/glue/nsCycleCollectorUtils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "mozilla/threads/nsThreadIDs.h"
1010

1111
#if defined(MOZILLA_INTERNAL_API)
12-
#define NS_IsCycleCollectorThread NS_IsCycleCollectorThread_P
1312
#if defined(XP_WIN)
1413
bool NS_IsCycleCollectorThread();
1514
#elif defined(NS_TLS)

xpcom/glue/nsThreadUtils.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@
1919
#include "mozilla/threads/nsThreadIDs.h"
2020
#include "mozilla/Likely.h"
2121

22-
// This is needed on some systems to prevent collisions between the symbols
23-
// appearing in xpcom_core and xpcomglue. It may be unnecessary in the future
24-
// with better toolchain support.
25-
#ifdef MOZILLA_INTERNAL_API
26-
# define NS_SetThreadName NS_SetThreadName_P
27-
# define NS_NewThread NS_NewThread_P
28-
# define NS_NewNamedThread NS_NewNamedThread_P
29-
# define NS_GetCurrentThread NS_GetCurrentThread_P
30-
# define NS_GetMainThread NS_GetMainThread_P
31-
# define NS_IsMainThread NS_IsMainThread_P
32-
# define NS_DispatchToCurrentThread NS_DispatchToCurrentThread_P
33-
# define NS_DispatchToMainThread NS_DispatchToMainThread_P
34-
# define NS_ProcessPendingEvents NS_ProcessPendingEvents_P
35-
# define NS_HasPendingEvents NS_HasPendingEvents_P
36-
# define NS_ProcessNextEvent NS_ProcessNextEvent_P
37-
#endif
38-
3922
//-----------------------------------------------------------------------------
4023
// These methods are alternatives to the methods on nsIThreadManager, provided
4124
// for convenience.

0 commit comments

Comments
 (0)