Closed
Bug 1338978
Opened 7 years ago
Closed 7 years ago
likely bug due to missing braces in SetMemoryGCSliceTimePrefChangedCallback()
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jesup, Unassigned)
Details
This looks like the call is properly indented, but the if is missing braces that would include it -- thus it will get invoked even if the pref value was out-of-bounds (like -1).
** CID 1400471: Control flow issues (NESTING_INDENT_MISMATCH)
/dom/base/nsJSEnvironment.cpp: 2331 in SetMemoryGCSliceTimePrefChangedCallback(const char *, void *)()
________________________________________________________________________________________________________
*** CID 1400471: Control flow issues (NESTING_INDENT_MISMATCH)
/dom/base/nsJSEnvironment.cpp: 2331 in SetMemoryGCSliceTimePrefChangedCallback(const char *, void *)()
2325 SetMemoryGCSliceTimePrefChangedCallback(const char* aPrefName, void* aClosure)
2326 {
2327 int32_t pref = Preferences::GetInt(aPrefName, -1);
2328 // handle overflow and negative pref values
2329 if (pref > 0 && pref < 100000)
2330 sActiveIntersliceGCBudget = pref;
>>> CID 1400471: Control flow issues (NESTING_INDENT_MISMATCH)
>>> This statement is indented to column 5, as if it were nested within the preceding parent statement, but it is not.
2331 JS_SetGCParameter(sContext, JSGC_SLICE_TIME_BUDGET, pref);
2332 }
2333
2334 static void
2335 SetMemoryGCCompactingPrefChangedCallback(const char* aPrefName, void* aClosure)
2336 {
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•