Bug 1145631 - Part 3: Replace MOZ_OVERRIDE with override in the XPIDL codegen; r=froydnj
authorEhsan Akhgari <ehsan@mozilla.com>
Sat, 21 Mar 2015 12:28:27 -0400
changeset 263773 745287406d9e1a3e3e884a924260782ed53ed143
parent 263772 08912c0b2b5de78fa9e8ea028ee87267fb5cbce4
child 263774 bd5245b8886da9919738b43a5ad02b38b4188e3c
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1145631
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1145631 - Part 3: Replace MOZ_OVERRIDE with override in the XPIDL codegen; r=froydnj
xpcom/idl-parser/header.py
--- a/xpcom/idl-parser/header.py
+++ b/xpcom/idl-parser/header.py
@@ -397,21 +397,21 @@ def write_interface(iface, fd):
                     raise Exception("Unexpected interface member: %s" % member)
 
     fd.write(iface_epilog % names)
 
     for member in iface.members:
         if isinstance(member, xpidl.Attribute):
             if member.infallible:
                 fd.write("\\\n  using %s::%s; " % (iface.name, attributeNativeName(member, True)))
-            fd.write("\\\n  %s MOZ_OVERRIDE; " % attributeAsNative(member, True))
+            fd.write("\\\n  %s override; " % attributeAsNative(member, True))
             if not member.readonly:
-                fd.write("\\\n  %s MOZ_OVERRIDE; " % attributeAsNative(member, False))
+                fd.write("\\\n  %s override; " % attributeAsNative(member, False))
         elif isinstance(member, xpidl.Method):
-            fd.write("\\\n  %s MOZ_OVERRIDE; " % methodAsNative(member))
+            fd.write("\\\n  %s override; " % methodAsNative(member))
     if len(iface.members) == 0:
         fd.write('\\\n  /* no methods! */')
     elif not member.kind in ('attribute', 'method'):
        fd.write('\\')
 
     fd.write(iface_forward % names)
 
     def emitTemplate(forward_infallible, tmpl, tmpl_notxpcom=None):
@@ -438,26 +438,26 @@ def write_interface(iface, fd):
                                      'nativeName': methodNativeName(member),
                                      'paramList': paramlistNames(member)})
         if len(iface.members) == 0:
             fd.write('\\\n  /* no methods! */')
         elif not member.kind in ('attribute', 'method'):
             fd.write('\\')
 
     emitTemplate(True,
-                 "\\\n  %(asNative)s MOZ_OVERRIDE { return _to %(nativeName)s(%(paramList)s); } ")
+                 "\\\n  %(asNative)s override { return _to %(nativeName)s(%(paramList)s); } ")
 
     fd.write(iface_forward_safe % names)
 
     # Don't try to safely forward notxpcom functions, because we have no
     # sensible default error return.  Instead, the caller will have to
     # implement them.
     emitTemplate(False,
-                 "\\\n  %(asNative)s MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->%(nativeName)s(%(paramList)s); } ",
-                 "\\\n  %(asNative)s MOZ_OVERRIDE; ")
+                 "\\\n  %(asNative)s override { return !_to ? NS_ERROR_NULL_POINTER : _to->%(nativeName)s(%(paramList)s); } ",
+                 "\\\n  %(asNative)s override; ")
 
     fd.write(iface_template_prolog % names)
 
     for member in iface.members:
         if isinstance(member, xpidl.ConstMember) or isinstance(member, xpidl.CDATA): continue
         fd.write("/* %s */\n" % member.toIDL())
         if isinstance(member, xpidl.Attribute):
             fd.write(example_tmpl % {'implclass': implclass,