Issue #795 - Make nsIUserInfo component optional

This allows the nsIUserinfo component to be disabled with --disable-userinfo in mozconfig
at build time, but leaves it on by default to avoid any compatibility issues in existing
applications.
This commit is contained in:
Gaming4JC 2018-10-25 18:12:58 -04:00 • committed by Roy Tam
commit 3c4b6babee
5 changed files with 38 additions and 17 deletions

View file

@ -18,19 +18,14 @@ UNIFIED_SOURCES += [
'StartupTimeline.cpp',
]
if CONFIG['OS_ARCH'] == 'WINNT':
# This file cannot be built in unified mode because of name clashes with Windows headers.
SOURCES += [
'nsUserInfoWin.cpp',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += [
'nsUserInfoMac.mm',
]
else:
UNIFIED_SOURCES += [
'nsUserInfoUnix.cpp',
]
if CONFIG['MOZ_USERINFO']:
if CONFIG['OS_ARCH'] == 'WINNT':
# This file cannot be built in unified mode because of name clashes with Windows headers.
SOURCES += ['nsUserInfoWin.cpp']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += ['nsUserInfoMac.mm']
else:
UNIFIED_SOURCES += ['nsUserInfoUnix.cpp']
FINAL_LIBRARY = 'xul'

View file

@ -4,10 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
'nsIAppStartup.idl',
'nsIUserInfo.idl',
]
XPIDL_SOURCES += ['nsIAppStartup.idl']
if CONFIG['MOZ_USERINFO']:
XPIDL_SOURCES += ['nsIUserInfo.idl']
XPIDL_MODULE = 'appstartup'