Bug 1018306 - Call interface.hasInterfaceObject rather than checking the truthiness of the method; r=bz
authorMs2ger <ms2ger@gmail.com>
Fri, 06 Jun 2014 10:06:27 +0200
changeset 206284 ea5754fabd067926bfd3ac92bf3d3016d05d38a3
parent 206283 9d393ad3c53933e2917241a9d9bdb2b7cf467625
child 206285 999ef6a46be8253b685cb86158003016897fa9a3
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1018306
milestone32.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 1018306 - Call interface.hasInterfaceObject rather than checking the truthiness of the method; r=bz
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -10187,17 +10187,17 @@ class CGDescriptor(CGThing):
                 continue
             if m.isMethod() and m == descriptor.operations['Jsonifier']:
                 hasJsonifier = True
                 hasMethod = descriptor.needsSpecialGenericOps()
                 jsonifierMethod = m
             elif (m.isMethod() and
                   (not m.isIdentifierLess() or m == descriptor.operations['Stringifier'])):
                 if m.isStatic():
-                    assert descriptor.interface.hasInterfaceObject
+                    assert descriptor.interface.hasInterfaceObject()
                     cgThings.append(CGStaticMethod(descriptor, m))
                     if m.returnsPromise():
                         cgThings.append(CGStaticMethodJitinfo(m))
                 elif descriptor.interface.hasInterfacePrototypeObject():
                     specializedMethod = CGSpecializedMethod(descriptor, m)
                     cgThings.append(specializedMethod)
                     if m.returnsPromise():
                         cgThings.append(CGMethodPromiseWrapper(descriptor, specializedMethod))
@@ -10207,17 +10207,17 @@ class CGDescriptor(CGThing):
                     elif descriptor.needsSpecialGenericOps():
                         hasMethod = True
             elif m.isAttr():
                 if m.stringifier:
                     raise TypeError("Stringifier attributes not supported yet. "
                                     "See bug 824857.\n"
                                     "%s" % m.location)
                 if m.isStatic():
-                    assert descriptor.interface.hasInterfaceObject
+                    assert descriptor.interface.hasInterfaceObject()
                     cgThings.append(CGStaticGetter(descriptor, m))
                 elif descriptor.interface.hasInterfacePrototypeObject():
                     cgThings.append(CGSpecializedGetter(descriptor, m))
                     if m.hasLenientThis():
                         hasLenientGetter = True
                     elif m.getExtendedAttribute("CrossOriginReadable"):
                         crossOriginGetters.add(m.identifier.name)
                     elif descriptor.needsSpecialGenericOps():
@@ -10225,17 +10225,17 @@ class CGDescriptor(CGThing):
                 if not m.readonly:
                     for extAttr in ["PutForwards", "Replaceable"]:
                         if m.getExtendedAttribute(extAttr):
                             raise TypeError("Writable attributes should not "
                                             "have %s specified.\n"
                                             "%s" %
                                             (extAttr, m.location))
                     if m.isStatic():
-                        assert descriptor.interface.hasInterfaceObject
+                        assert descriptor.interface.hasInterfaceObject()
                         cgThings.append(CGStaticSetter(descriptor, m))
                     elif descriptor.interface.hasInterfacePrototypeObject():
                         cgThings.append(CGSpecializedSetter(descriptor, m))
                         if m.hasLenientThis():
                             hasLenientSetter = True
                         elif m.getExtendedAttribute("CrossOriginWritable"):
                             crossOriginSetters.add(m.identifier.name)
                         elif descriptor.needsSpecialGenericOps():