Don't pass extra args to Finalize and Trace methods
authorBen Turner <bent.mozilla@gmail.com>
Wed, 08 Feb 2012 12:45:58 -0800
changeset 86461 6cf8fbd470bacafccf8ff7c0b812d51c4fee5f39
parent 86460 16141e260c6120a000bf9ebddf3fb4a3da6b03ae
child 86462 6fb6b364892fe283c35433e454613ba492d263f5
push id98
push userbturner@mozilla.com
push dateWed, 08 Feb 2012 20:45:54 +0000
milestone13.0a1
Don't pass extra args to Finalize and Trace methods
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -304,32 +304,32 @@ class CGClassFinalizeHook(CGAbstractClas
 
     def generate_code(self):
         if self.descriptor.customFinalize:
             return """
   if (self) {
 #if 0
     self->%s(%s);
 #endif
-  }""" % (self.name, ', '.join([str(a.name) for a in self.args]))
+  }""" % (self.name, self.args[0].name)
         return "\n  self->Release();"
 
 class CGClassTraceHook(CGAbstractClassHook):
     def __init__(self, descriptor):
         args = [Argument('JSTracer*', 'trc'), Argument('JSObject*', 'obj')]
         CGAbstractClassHook.__init__(self, descriptor, TRACE_HOOK_NAME, 'void',
                                      args)
 
     def generate_code(self):
         return """
   if (self) {
 #if 0
     self->%s(%s);
 #endif
-  }""" % (self.name, ', '.join([str(a.name) for a in self.args]))
+  }""" % (self.name, self.args[0].name)
 
 class MethodDefiner:
     def __init__(self, descriptor):
         self.descriptor = descriptor
         self.methods = [m for m in self.descriptor.interface.members if
                         m.isMethod()]
     def hasMethods(self):
         return len(self.methods) != 0