Bug 610077. Drop the default timeout clamp to 4ms. r=jst
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 31 Mar 2011 15:29:44 -0400
changeset 64522 231d479842007d333c332be4fbb20759da63416d
parent 64521 4a0faa67237d824db19bb4f766860ec429979df4
child 64523 a02c78f5cf12cce9caf10f6f8141dcdfdf3b7c80
push idunknown
push userunknown
push dateunknown
reviewersjst
bugs610077
milestone2.2a1pre
Bug 610077. Drop the default timeout clamp to 4ms. r=jst
dom/base/nsGlobalWindow.cpp
modules/libpref/src/init/all.js
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -269,17 +269,17 @@ PRInt32 gTimeoutCnt                     
 static PRBool               gDOMWindowDumpEnabled      = PR_FALSE;
 #endif
 
 #if defined(DEBUG_bryner) || defined(DEBUG_chb)
 #define DEBUG_PAGE_CACHE
 #endif
 
 // The default shortest interval/timeout we permit
-#define DEFAULT_MIN_TIMEOUT_VALUE 10 // 10ms
+#define DEFAULT_MIN_TIMEOUT_VALUE 4 // 4ms
 #define DEFAULT_MIN_BACKGROUND_TIMEOUT_VALUE 1000 // 1000ms
 static PRInt32 gMinTimeoutValue;
 static PRInt32 gMinBackgroundTimeoutValue;
 inline PRInt32
 nsGlobalWindow::DOMMinTimeoutValue() const {
   PRBool isBackground = !mOuterWindow || mOuterWindow->IsBackground();
   return
     NS_MAX(isBackground ? gMinBackgroundTimeoutValue : gMinTimeoutValue, 0);
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -569,17 +569,17 @@ pref("dom.popup_allowed_events", "change
 pref("dom.disable_open_click_delay", 1000);
 
 pref("dom.storage.enabled", true);
 pref("dom.storage.default_quota",      5120);
 
 pref("dom.send_after_paint_to_content", false);
 
 // Timeout clamp in ms for timeouts we clamp
-pref("dom.min_timeout_value", 10);
+pref("dom.min_timeout_value", 4);
 // And for background windows
 pref("dom.min_background_timeout_value", 1000);
 
 // Parsing perf prefs. For now just mimic what the old code did.
 #ifndef XP_WIN
 pref("content.sink.pending_event_mode", 0);
 #endif