Bug 837352 - Don't generate dictionary code in WebIDL unless used in generated code. r=bz

This commit is contained in:
William Chen 2013-02-25 09:20:49 -08:00
parent 076b7bfcfa
commit f452feed2b

View File

@ -65,12 +65,14 @@ class Configuration:
# Figure out what our main-thread and worker dictionaries and callbacks
# are.
mainTypes = set()
for descriptor in self.getDescriptors(workers=False, isExternal=False):
for descriptor in ([self.getDescriptor("DummyInterface", workers=False)] +
self.getDescriptors(workers=False, isExternal=False, skipGen=False)):
mainTypes |= set(getFlatTypes(getTypesFromDescriptor(descriptor)))
(mainCallbacks, mainDictionaries) = findCallbacksAndDictionaries(mainTypes)
workerTypes = set();
for descriptor in self.getDescriptors(workers=True, isExternal=False):
for descriptor in ([self.getDescriptor("DummyInterfaceWorkers", workers=True)] +
self.getDescriptors(workers=True, isExternal=False, skipGen=False)):
workerTypes |= set(getFlatTypes(getTypesFromDescriptor(descriptor)))
(workerCallbacks, workerDictionaries) = findCallbacksAndDictionaries(workerTypes)