Bug 999631 - Disable startup cache via a dedicated flag. r=mshal

This commit is contained in:
Alexandre Poirot
2014-04-23 04:57:00 -04:00
parent 338150cfc5
commit 264295d76f
3 changed files with 20 additions and 2 deletions

View File

@@ -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 ========================================================

View File

@@ -93,7 +93,7 @@ StartupCache::GetSingleton()
if (XRE_GetProcessType() != GeckoProcessType_Default) {
return nullptr;
}
#ifdef MOZ_B2G
#ifdef MOZ_DISABLE_STARTUP_CACHE
return nullptr;
#endif

View File

@@ -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')