Bug 999631 - Disable startup cache via a dedicated flag. r=mshal
This commit is contained in:
17
configure.in
17
configure.in
@@ -7446,6 +7446,23 @@ if test -n "$MOZ_REFLOW_PERF"; then
|
||||
AC_DEFINE(MOZ_REFLOW_PERF)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Offer a way to disable the startup cache
|
||||
dnl ========================================================
|
||||
MOZ_DISABLE_STARTUPCACHE=
|
||||
|
||||
MOZ_ARG_DISABLE_BOOL(startupcache,
|
||||
[ --disable-startupcache Disable startup cache ],
|
||||
MOZ_DISABLE_STARTUPCACHE=1,
|
||||
MOZ_DISABLE_STARTUPCACHE=)
|
||||
|
||||
dnl bug 988880: disable startup cache on b2g
|
||||
if test -n "$MOZ_B2G"; then
|
||||
MOZ_DISABLE_STARTUPCACHE=1
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_DISABLE_STARTUPCACHE)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable Radio Interface for B2G (Gonk usually)
|
||||
dnl ========================================================
|
||||
|
||||
@@ -93,7 +93,7 @@ StartupCache::GetSingleton()
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return nullptr;
|
||||
}
|
||||
#ifdef MOZ_B2G
|
||||
#ifdef MOZ_DISABLE_STARTUP_CACHE
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -376,7 +376,8 @@ def main():
|
||||
f.preload(log[key])
|
||||
|
||||
# Fill startup cache
|
||||
if isinstance(formatter, OmniJarFormatter) and launcher.can_launch():
|
||||
if isinstance(formatter, OmniJarFormatter) and launcher.can_launch() \
|
||||
and buildconfig.substs['MOZ_DISABLE_STARTUPCACHE'] != '1':
|
||||
if buildconfig.substs['LIBXUL_SDK']:
|
||||
gre_path = mozpack.path.join(buildconfig.substs['LIBXUL_DIST'],
|
||||
'bin')
|
||||
|
||||
Reference in New Issue
Block a user