Closed Bug 1145631 Opened 9 years ago Closed 9 years ago

Stop using MOZ_OVERRIDE and MOZ_FINAL

Categories

(Core :: MFBT, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

(Depends on 1 open bug)

Details

Attachments

(6 files)

We can now use the override and final keywords.
This patch was automatically generated using the following script:


function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
Attachment #8580812 - Flags: review?(nfroyd)
Attachment #8580818 - Flags: review?(nfroyd)
Attachment #8580812 - Flags: review?(nfroyd) → review+
Attachment #8580813 - Flags: review?(nfroyd) → review+
Attachment #8580814 - Flags: review?(nfroyd) → review+
Attachment #8580816 - Flags: review?(nfroyd) → review+
Attachment #8580817 - Flags: review?(nfroyd) → review+
Attachment #8580818 - Flags: review?(nfroyd) → review+
Blocks: 1146094
Depends on: 1146203
Can we please do this on Aurora as well? The gcc support situation is the same and it's already annoyance on uplifts (and will continue to do so throughout the ESR cycle otherwise).
Flags: needinfo?(ehsan)
Sure, I can submit this for approval.
Flags: needinfo?(ehsan)
Comment on attachment 8580812 [details] [diff] [review]
Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree

This change doesn't affect our binaries, it only removes a C++ macro which has been obsoleted by our compiler upgrades, and is mostly generated through a script.

Uplifting this will make future uplifts for other bugs easier (see comment 10.)
Attachment #8580812 - Flags: approval-mozilla-aurora?
Comment on attachment 8580812 [details] [diff] [review]
Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree

I guess this is going to make the life of some people harder (they will just have to revert this change) but as 38 is an esr, we want the uplifts to be as easy as possible.
Attachment #8580812 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Anyone of you mind updating https://developer.mozilla.org/en-US/docs/Mozilla/C++_Portability_Guide
with the new rationale and recommendations?
(In reply to Gian-Carlo Pascutto [:gcp] from comment #15)
> Anyone of you mind updating
> https://developer.mozilla.org/en-US/docs/Mozilla/C++_Portability_Guide
> with the new rationale and recommendations?

Done.
You need to log in before you can comment on or make changes to this bug.