Bug 1317180, part 7 - Remove TypeSpec fields myChmod and otherChmod that are never set. r=billm
authorAndrew McCreight <continuation@gmail.com>
Mon, 14 Nov 2016 11:17:12 -0800
changeset 439659 0dea817804ac71d9e8720b3dc0d36d47189aaf71
parent 439658 9c02838f29ecc5af20638eabdb9ebb3bb861e92b
child 439660 b7ccea321333c5b935bc04fe2455d2c522b4da9d
push id36064
push userrthijssen@mozilla.com
push dateWed, 16 Nov 2016 13:38:27 +0000
reviewersbillm
bugs1317180
milestone53.0a1
Bug 1317180, part 7 - Remove TypeSpec fields myChmod and otherChmod that are never set. r=billm The other fields, spec, array, and nullable, are set in some places. Also remove a dead chunk of code with a FIXME that refers to a bug that was WONTFIXed in 2010.
ipc/ipdl/ipdl/ast.py
ipc/ipdl/ipdl/type.py
--- a/ipc/ipdl/ipdl/ast.py
+++ b/ipc/ipdl/ipdl/ast.py
@@ -406,19 +406,16 @@ class Param(Node):
         self.typespec = typespec
 
 class TypeSpec(Node):
     def __init__(self, loc, spec):
         Node.__init__(self, loc)
         self.spec = spec                # QualifiedId
         self.array = 0                  # bool
         self.nullable = 0               # bool
-        self.myChmod = None             # None or string
-        self.otherChmod = None          # None or string
-
     def basename(self):
         return self.spec.baseid
 
     def __str__(self):  return str(self.spec)
 
 class QualifiedId:              # FIXME inherit from node?
     def __init__(self, loc, baseid, quals=[ ]):
         assert isinstance(baseid, str)
--- a/ipc/ipdl/ipdl/type.py
+++ b/ipc/ipdl/ipdl/type.py
@@ -200,17 +200,16 @@ class IPDLType(Type):
     def isProtocol(self): return False
     def isActor(self): return False
     def isStruct(self): return False
     def isUnion(self): return False
     def isArray(self): return False
     def isAtom(self):  return True
     def isCompound(self): return False
     def isShmem(self): return False
-    def isChmod(self): return False
     def isFD(self): return False
     def isEndpoint(self): return False
 
     def isAsync(self): return self.sendSemantics == ASYNC
     def isSync(self): return self.sendSemantics == SYNC
     def isInterrupt(self): return self.sendSemantics is INTR
 
     def hasReply(self):  return (self.isSync() or self.isInterrupt())
@@ -1219,32 +1218,16 @@ class GatherDecls(TcheckVisitor):
 
 
     def _canonicalType(self, itype, typespec, chmodallowed=0):
         loc = typespec.loc
         if itype.isIPDL():
             if itype.isProtocol():
                 itype = ActorType(itype,
                                   nullable=typespec.nullable)
-            # FIXME/cjones: ShmemChmod is disabled until bug 524193
-            if 0 and chmodallowed and itype.isShmem():
-                itype = ShmemChmodType(
-                    itype,
-                    myChmod=typespec.myChmod,
-                    otherChmod=typespec.otherChmod)
-
-        if ((typespec.myChmod or typespec.otherChmod)
-            and not (itype.isIPDL() and (itype.isShmem() or itype.isChmod()))):
-            self.error(
-                loc,
-                "fine-grained access controls make no sense for type `%s'",
-                itype.name())
-
-        if not chmodallowed and (typespec.myChmod or typespec.otherChmod):
-            self.error(loc, "fine-grained access controls not allowed here")
 
         if typespec.nullable and not (itype.isIPDL() and itype.isActor()):
             self.error(
                 loc,
                 "`nullable' qualifier for type `%s' makes no sense",
                 itype.name())
 
         if typespec.array: