Split MOZ_DEVTOOLS into MOZ_DEVTOOLS (client) and MOZ_DEVTOOLS_SERVER (backend) and make both optional

This commit is contained in:
NTD 2018-02-17 14:09:31 -05:00 committed by Roy Tam
commit 16ee2a0626
8 changed files with 50 additions and 17 deletions

View file

@ -169,6 +169,9 @@ def old_configure_options(*options):
'--enable-crashreporter',
'--enable-dbus',
'--enable-debug-js-modules',
'--enable-jetpack',
'--enable-devtools-server',
'--enable-devtools',
'--enable-directshow',
'--enable-dtrace',
'--enable-dump-painting',

View file

@ -4,13 +4,9 @@
# 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/.
if CONFIG['MOZ_DEVTOOLS'] and CONFIG['MOZ_DEVTOOLS'] not in ('all', 'server'):
error('Unsupported MOZ_DEVTOOLS value: %s' % (CONFIG['MOZ_DEVTOOLS']))
if CONFIG['MOZ_DEVTOOLS']:
DIRS += ['client']
if CONFIG['MOZ_DEVTOOLS'] == 'all':
DIRS += [
'client',
]
DIRS += [
'server',

View file

@ -81,8 +81,5 @@ LOCAL_INCLUDES += [
if CONFIG['MOZ_TOOLKIT_SEARCH']:
DEFINES['MOZ_TOOLKIT_SEARCH'] = True
if CONFIG['MOZ_DEVTOOLS'] == 'all':
DEFINES['MOZ_DEVTOOLS_ALL'] = True
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']

View file

@ -57,7 +57,7 @@ static RedirEntry kRedirMap[] = {
"credits", "https://www.mozilla.org/credits/",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT
},
#ifdef MOZ_DEVTOOLS_ALL
#ifdef MOZ_DEVTOOLS
{
"debugging", "chrome://devtools/content/aboutdebugging/aboutdebugging.xhtml",
nsIAboutModule::ALLOW_SCRIPT

View file

@ -23,6 +23,3 @@ LOCAL_INCLUDES += [
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_DEVTOOLS'] == 'all':
DEFINES['MOZ_DEVTOOLS_ALL'] = True

View file

@ -169,7 +169,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "crashes", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
#endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "credits", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
#ifdef MOZ_DEVTOOLS_ALL
#ifdef MOZ_DEVTOOLS
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "debugging", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
#endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "license", &kNS_ABOUT_REDIRECTOR_MODULE_CID },

View file

@ -2314,8 +2314,9 @@ MOZ_CONTENT_SANDBOX=
MOZ_GMP_SANDBOX=
MOZ_SANDBOX=1
MOZ_BINARY_EXTENSIONS=
MOZ_DEVTOOLS=server
MOZ_JETPACK=1
MOZ_DEVTOOLS_SERVER=1
MOZ_DEVTOOLS=
case "$target_os" in
mingw*)
@ -4806,6 +4807,44 @@ fi
AC_SUBST(MOZ_JETPACK)
dnl ========================================================
dnl = Disable Mozilla Developer Tools (server)
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(devtools-server,
[ --disable-devtools-server Disable Mozilla Developer Tools (server)],
MOZ_DEVTOOLS_SERVER=,
MOZ_DEVTOOLS_SERVER=1)
if test -n "$MOZ_DEVTOOLS_SERVER"; then
if test ! -n "$MOZ_JETPACK"; then
AC_MSG_ERROR("Jetpack is required to include the Developer Tools Server")
fi
AC_DEFINE(MOZ_DEVTOOLS_SERVER)
fi
AC_SUBST(MOZ_DEVTOOLS_SERVER)
dnl ========================================================
dnl = Enable Mozilla Developer Tools (client)
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(devtools,
[ --enable-devtools Enable Mozilla Developer Tools (client)],
MOZ_DEVTOOLS=1,
MOZ_DEVTOOLS=)
if test -n "$MOZ_DEVTOOLS"; then
if test ! -n "$MOZ_DEVTOOLS_SERVER"; then
AC_MSG_ERROR("The Developer Tools Server is required to include the client")
fi
AC_DEFINE(MOZ_DEVTOOLS)
fi
AC_SUBST(MOZ_DEVTOOLS)
dnl ========================================================
dnl = Define default location for MOZILLA_FIVE_HOME
dnl ========================================================
@ -5688,7 +5727,6 @@ AC_SUBST(LIBJPEG_TURBO_USE_YASM)
AC_SUBST_LIST(LIBJPEG_TURBO_ASFLAGS)
AC_SUBST(MOZ_LIBAV_FFT)
AC_SUBST_LIST(LIBAV_FFT_ASFLAGS)
AC_SUBST(MOZ_DEVTOOLS)
AC_SUBST(MOZ_PACKAGE_JSSHELL)
AC_SUBST(MOZ_FOLD_LIBS)

View file

@ -132,8 +132,10 @@ DIRS += [
if CONFIG['MOZ_PREF_EXTENSIONS']:
DIRS += ['/extensions/pref']
if CONFIG['MOZ_DEVTOOLS_SERVER']:
DIRS += ['/devtools']
DIRS += [
'/devtools',
'/services',
'/startupcache',
'/js/ductwork/debugger',