Closed
Bug 625256
Opened 15 years ago
Closed 15 years ago
Make the DOM timeout clamp a preference
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla2.0b10
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
|
6.25 KB,
patch
|
jst
:
review+
jst
:
approval2.0+
|
Details | Diff | Splinter Review |
This should be pretty easy to do, and would make it easier for nightly testers to experiment with different values, or for us to change the pref early in a release cycles and then backtrack later if issues arise.
| Assignee | ||
Comment 1•15 years ago
|
||
Attachment #503389 -
Flags: review?(jst)
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Comment 2•15 years ago
|
||
Comment on attachment 503389 [details] [diff] [review]
Make the DOM timeout clamp a pref, but enforce that it's nonnegative.
>diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
>--- a/dom/base/nsGlobalWindow.cpp
>+++ b/dom/base/nsGlobalWindow.cpp
>@@ -265,18 +265,22 @@ PRInt32 gTimeoutCnt
> #if !(defined(NS_DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
> static PRBool gDOMWindowDumpEnabled = PR_FALSE;
> #endif
>
> #if defined(DEBUG_bryner) || defined(DEBUG_chb)
> #define DEBUG_PAGE_CACHE
> #endif
>
>-// The shortest interval/timeout we permit
>-#define DOM_MIN_TIMEOUT_VALUE 6 // 6ms
>+// The default shortest interval/timeout we permit
>+#define DEFAULT_MIN_TIMEOUT_VALUE 10 // 10ms
>+static PRInt32 gMinTimeoutValue;
>+static inline PRInt32 DOMMinTimeoutValue() {
>+ return PR_MAX(gMinTimeoutValue, 0);
NS_MAX?
| Assignee | ||
Comment 3•15 years ago
|
||
Er, yes. Consider that fixed.
| Assignee | ||
Updated•15 years ago
|
Attachment #503389 -
Attachment is obsolete: true
Attachment #503389 -
Flags: review?(jst)
| Assignee | ||
Comment 4•15 years ago
|
||
Attachment #503496 -
Flags: review?(jst)
Updated•15 years ago
|
Attachment #503496 -
Flags: review?(jst) → review+
| Assignee | ||
Updated•15 years ago
|
Whiteboard: [need review] → [need approval]
| Assignee | ||
Updated•15 years ago
|
Attachment #503496 -
Flags: approval2.0?
Updated•15 years ago
|
Attachment #503496 -
Flags: approval2.0? → approval2.0+
| Assignee | ||
Updated•15 years ago
|
Whiteboard: [need approval] → [need landing]
| Assignee | ||
Comment 5•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [need landing]
Target Milestone: --- → mozilla2.0b10
Comment 6•15 years ago
|
||
The pref is "dom.min_timeout_value" (in ms) and it should be mentioned on https://developer.mozilla.org/en/DOM/window.setTimeout#Minimum_delay_and_timeout_nesting
Keywords: dev-doc-needed
Comment 7•15 years ago
|
||
Documentation updated:
https://developer.mozilla.org/en/DOM/window.setTimeout#Minimum_delay_and_timeout_nesting
https://developer.mozilla.org/en/Preferences/Mozilla_preferences_for_uber-geeks#DOM_preferences
And added a note to Firefox 4 for developers.
Keywords: dev-doc-needed → dev-doc-complete
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•