Skip to content

Commit

Permalink
Bug 999631 - Disable startup cache via a dedicated flag. r=mshal
Browse files Browse the repository at this point in the history
  • Loading branch information
ochameau committed Apr 23, 2014
1 parent e7c0feb commit ccc88f0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 ========================================================
Expand Down
2 changes: 1 addition & 1 deletion startupcache/StartupCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ StartupCache::GetSingleton()
if (XRE_GetProcessType() != GeckoProcessType_Default) {
return nullptr;
}
#ifdef MOZ_B2G
#ifdef MOZ_DISABLE_STARTUP_CACHE
return nullptr;
#endif

Expand Down
3 changes: 2 additions & 1 deletion toolkit/mozapps/installer/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ def is_native(path):
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')
Expand Down

0 comments on commit ccc88f0

Please sign in to comment.