Closed Bug 796279 Opened 13 years ago Closed 13 years ago

remove last remaining PR_MAX usages from the tree

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: froydnj, Assigned: froydnj)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Bug 785542 didn't remove a couple usages of PR_MAX because converting them to NS_MAX would have required consistent constexpr support across compilers. But there's no reason that we have to wait that long; manually inlining what NS_MAX would produce should work just fine.
Fair enough! Do you wanna take this? :-)
Attached patch patchSplinter Review
Sure, I can take this!
Assignee: nobody → nfroyd
Status: NEW → ASSIGNED
Attachment #667149 - Flags: review?(ehsan)
Comment on attachment 667149 [details] [diff] [review] patch Review of attachment 667149 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/style/nsCSSProps.cpp @@ +101,5 @@ > // largest sizeof(#aliasname_) before or including that alias. > #define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \ > eMaxCSSAliasNameSizeBefore_##aliasmethod_, \ > eMaxCSSAliasNameSizeWith_##aliasmethod_ = \ > + CSS_MAX(sizeof(#aliasname_), eMaxCSSAliasNameSizeBefore_##aliasmethod_) - 1, Nit: please #undef this when you're done with it. ::: xpcom/glue/nsTArray.h @@ +1348,5 @@ > // __attribute__((aligned(foo))). > union { > char mAutoBuf[sizeof(nsTArrayHeader) + N * sizeof(elem_type)]; > + mozilla::AlignedElem<(MOZ_ALIGNOF(Header) > MOZ_ALIGNOF(elem_type)) > + ? MOZ_ALIGNOF(Header) : MOZ_ALIGNOF(elem_type)> mAlign; Nit: please a small comment on why we're doing this.
Attachment #667149 - Flags: review?(ehsan) → review+
I had to back this out as part of a weird reftest breakage on 64-bit platforms: https://hg.mozilla.org/integration/mozilla-inbound/rev/402e2cf6602d Example failure log: https://tbpl.mozilla.org/php/getParsedLog.php?id=15760281&tree=Mozilla-Inbound
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: