bug 473167 - increase the maximum time chrome scripts are allowed to run in the debug builds. r=ted.mielczarek
authorIgor Bukanov <igor@mir2.org>
Mon, 12 Jan 2009 18:15:12 +0100
changeset 23711 e557751f1001fb36b4a3bba6d27c823fe31b4d6f
parent 23710 26c96754c9b4f61b56f4b04e0b36902e87d8631f
child 23712 9043aef7fffeca97559372ba24f9a8378aed1789
push idunknown
push userunknown
push dateunknown
reviewersted.mielczarek
bugs473167
milestone1.9.2a1pre
bug 473167 - increase the maximum time chrome scripts are allowed to run in the debug builds. r=ted.mielczarek
build/Makefile.in
build/pgo/Makefile.in
build/pgo/automation.py.in
testing/mochitest/Makefile.in
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -104,16 +104,22 @@ AUTOMATION_PPARGS += -DIS_CYGWIN=1
 endif
 
 ifeq ($(ENABLE_TESTS), 1)
 AUTOMATION_PPARGS += -DIS_TEST_BUILD=1
 else
 AUTOMATION_PPARGS += -DIS_TEST_BUILD=0
 endif
 
+ifeq ($(MOZ_DEBUG), 1)
+AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=1
+else
+AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=0
+endif
+
 _LEAKTEST_DIR = $(DEPTH)/_leaktest
 
 _LEAKTEST_FILES =    \
 		automation.py \
 		leaktest.py \
 		bloatcycle.html \
 		$(topsrcdir)/build/pgo/server-locations.txt \
 		$(NULL)
--- a/build/pgo/Makefile.in
+++ b/build/pgo/Makefile.in
@@ -109,16 +109,22 @@ AUTOMATION_PPARGS += -DIS_CYGWIN=1
 endif
 
 ifeq ($(ENABLE_TESTS), 1)
 AUTOMATION_PPARGS += -DIS_TEST_BUILD=1
 else
 AUTOMATION_PPARGS += -DIS_TEST_BUILD=0
 endif
 
+ifeq ($(MOZ_DEBUG), 1)
+AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=1
+else
+AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=0
+endif
+
 automation.py: automation.py.in
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
 	$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
 
 genpgocert.py: genpgocert.py.in
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
 	$(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
 
--- a/build/pgo/automation.py.in
+++ b/build/pgo/automation.py.in
@@ -79,16 +79,17 @@ IS_CYGWIN = False
 #expand IS_CAMINO = __IS_CAMINO__ != 0
 #expand BIN_SUFFIX = __BIN_SUFFIX__
 
 UNIXISH = not IS_WIN32 and not IS_MAC
 
 #expand DEFAULT_APP = "./" + __BROWSER_PATH__
 #expand CERTS_DIR = __CERTS_DIR__
 #expand IS_TEST_BUILD = __IS_TEST_BUILD__
+#expand IS_DEBUG_BUILD = __IS_DEBUG_BUILD__
 
 ###########
 # LOGGING #
 ###########
 
 # We use the logging system here primarily because it'll handle multiple
 # threads, which is needed to process the output of the server and application
 # processes simultaneously.
@@ -309,16 +310,23 @@ user_pref("layout.debug.enable_data_xbl"
 user_pref("browser.EULA.override", true);
 user_pref("javascript.options.jit.content", true);
 user_pref("gfx.color_management.force_srgb", true);
 
 user_pref("camino.warn_when_closing", false); // Camino-only, harmless to others
 """
   prefs.append(part)
 
+  # Increase the max script run time 10-fold for debug builds
+  if (IS_DEBUG_BUILD):
+    prefs.append("""\
+user_pref("dom.max_script_run_time", 100);
+user_pref("dom.max_chrome_script_run_time", 200);
+""")
+
   locations = readLocations()
 
   # Grant God-power to all the privileged servers on which tests run.
   privileged = filter(lambda loc: "privileged" in loc.options, locations)
   for (i, l) in itertools.izip(itertools.count(1), privileged):
     part = """
 user_pref("capability.principal.codebase.p%(i)d.granted",
           "UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite \
--- a/testing/mochitest/Makefile.in
+++ b/testing/mochitest/Makefile.in
@@ -121,16 +121,22 @@ TEST_DRIVER_PPARGS += -DIS_CYGWIN=1
 endif
 
 ifeq ($(ENABLE_TESTS), 1)
 TEST_DRIVER_PPARGS += -DIS_TEST_BUILD=1
 else
 TEST_DRIVER_PPARGS += -DIS_TEST_BUILD=0
 endif
 
+ifeq ($(MOZ_DEBUG), 1)
+TEST_DRIVER_PPARGS += -DIS_DEBUG_BUILD=1
+else
+TEST_DRIVER_PPARGS += -DIS_DEBUG_BUILD=0
+endif
+
 runtests.py: runtests.py.in
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
 	$(TEST_DRIVER_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@
 
 automation.py: $(topsrcdir)/build/pgo/automation.py.in
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
 	$(TEST_DRIVER_PPARGS) $(DEFINES) $(ACDEFINES) $^ > $@