Bug 1337536 - MessageType ctor assert should check cdtype. r=billm draft
authorAndrew McCreight <continuation@gmail.com>
Tue, 07 Feb 2017 14:15:31 -0800
changeset 480699 ef145592225f7a5b99cdc54f2c0eda6fa2687baa
parent 480698 1852753a1879a172e7cac410cb35597b1e5be3fb
child 480700 863a6b5692b22f5ce475197d21886d1ae5a01c7e
push id44634
push userbmo:continuation@gmail.com
push dateWed, 08 Feb 2017 20:41:52 +0000
reviewersbillm
bugs1337536
milestone54.0a1
Bug 1337536 - MessageType ctor assert should check cdtype. r=billm type is some existing Python object, so this assertion can never fail. Looking at GatherDecls::visitMessageDecl, I think this is supposed to be checking cdecl. MozReview-Commit-ID: 8Oppw5SYdWO
ipc/ipdl/ipdl/type.py
--- a/ipc/ipdl/ipdl/type.py
+++ b/ipc/ipdl/ipdl/type.py
@@ -180,17 +180,17 @@ class IPDLType(Type):
     def needsMoreJuiceThan(self, o):
         return not IPDLType.convertsTo(self, o)
 
 class MessageType(IPDLType):
     def __init__(self, nested, prio, sendSemantics, direction,
                  ctor=False, dtor=False, cdtype=None, compress=False,
                  verify=False):
         assert not (ctor and dtor)
-        assert not (ctor or dtor) or type is not None
+        assert not (ctor or dtor) or cdtype is not None
 
         self.nested = nested
         self.prio = prio
         self.nestedRange = (nested, nested)
         self.sendSemantics = sendSemantics
         self.direction = direction
         self.params = [ ]
         self.returns = [ ]