Bug 841404. Make sure that we treat dictionaries inside sequence and array members of a dictionary as dependencies for it. r=peterv

This commit is contained in:
Boris Zbarsky 2013-02-17 11:22:11 -05:00
parent 97e73be205
commit d37856e270

View File

@ -6812,14 +6812,21 @@ class CGDictionary(CGThing):
def makeIdName(name):
return name + "_id"
@staticmethod
def getDictionaryDependenciesFromType(type):
if type.isDictionary():
return set([type.unroll().inner])
if type.isSequence() or type.isArray():
return CGDictionary.getDictionaryDependenciesFromType(type.unroll())
return set()
@staticmethod
def getDictionaryDependencies(dictionary):
deps = set();
if dictionary.parent:
deps.add(dictionary.parent)
for member in dictionary.members:
if member.type.isDictionary():
deps.add(member.type.unroll().inner)
deps |= CGDictionary.getDictionaryDependenciesFromType(member.type)
return deps