зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b2b58ab3d4
Коммит
83a7dcbda5
|
@ -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
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче