Stop using MOZ_OVERRIDE and MOZ_FINAL

RESOLVED FIXED in Firefox 38

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

(Depends on 1 bug)

unspecified
mozilla39
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox38 fixed, firefox39 fixed)

Details

Attachments

(6 attachments)

(Assignee)

Description

4 years ago
We can now use the override and final keywords.
(Assignee)

Comment 2

4 years ago
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)
(Assignee)

Comment 7

4 years ago
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+

Updated

4 years ago
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)
(Assignee)

Comment 11

4 years ago
Sure, I can submit this for approval.
Flags: needinfo?(ehsan)
(Assignee)

Comment 12

4 years ago
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.