Closed Bug 1421197 Opened 8 years ago Closed 8 years ago

use 64-bit for restyle generation counters to avoid overflow issues

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: chenpighead, Assigned: chenpighead)

References

Details

Attachments

(1 file)

We use 32-bit counters while counting the restyle generations [1], but think of getting the generations as 64-bit counters [2]. I believe we do want to use 64-bit for all the generation counters. I did a bit archaeology and found that this is something originated from bug 1203766 comment 13. [1] https://searchfox.org/mozilla-central/rev/7a8c667bdd2a4a32746c9862356e199627c0896d/layout/base/RestyleManager.h#266-268 [2] https://searchfox.org/mozilla-central/rev/7a8c667bdd2a4a32746c9862356e199627c0896d/layout/base/nsPresContext.h#1034-1035
Ah, yes I filed this one a few months ago too, but never got around to it...
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Comment on attachment 8932377 [details] Bug 1421197 - use 64-bit for restyle generation counters to avoid overflow issues. https://reviewboard.mozilla.org/r/203434/#review208874 The hover generation doesn't have the same problem of consumers thinking it should be a uint64_t but we're storing it as uint32_t. The consumers like https://searchfox.org/mozilla-central/rev/7a8c667bdd2a4a32746c9862356e199627c0896d/layout/base/PresShell.cpp#3773-3774 are using uint32_t. So I don't think we should change mHoverGeneration unless we also change the consumers. And I think it's probably fine to leave mHoverGeneration as it is. So r=me with mHoverGeneration unchanged.
Attachment #8932377 - Flags: review+
(In reply to Cameron McCormack (:heycam) from comment #4) > Comment on attachment 8932377 [details] > Bug 1421197 - use 64-bit for restyle generation counters to avoid overflow > issues. > > https://reviewboard.mozilla.org/r/203434/#review208874 > > The hover generation doesn't have the same problem of consumers thinking it > should be a uint64_t but we're storing it as uint32_t. The consumers like > https://searchfox.org/mozilla-central/rev/ > 7a8c667bdd2a4a32746c9862356e199627c0896d/layout/base/PresShell.cpp#3773-3774 > are using uint32_t. So I don't think we should change mHoverGeneration > unless we also change the consumers. And I think it's probably fine to > leave mHoverGeneration as it is. So r=me with mHoverGeneration unchanged. Ok, I'll leave mHoverGeneration unchanged. Sorry for not removing the review request in this bug, actually, I did uploaded the patch to bug 1376117, but somehow forgot to remove the request here. Set the duplicate flag in the other way around since we're going to land the patch here.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Pushed by jichen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/660d64624ea9 use 64-bit for restyle generation counters to avoid overflow issues. r=heycam
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: