Bug 1680223 - Generate right include for InstrumentedProps; r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D99631
This commit is contained in:
Edgar Chen 2020-12-16 13:47:53 +00:00
Родитель 84200feb0c
Коммит c9da52cf4e
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -18227,6 +18227,9 @@ class CGBindingRoot(CGThing):
descriptorsHaveInstrumentedProps = any(
d.instrumentedProps for d in descriptors if d.concrete
)
descriptorsHaveNeedsMissingPropUseCounters = any(
d.needsMissingPropUseCounters for d in descriptors if d.concrete
)
bindingHeaders["mozilla/UseCounter.h"] = (
descriptorsHaveUseCounters or descriptorsHaveInstrumentedProps
@ -18234,7 +18237,7 @@ class CGBindingRoot(CGThing):
# Make sure to not overwrite existing pref header bits!
bindingHeaders[prefHeader(MISSING_PROP_PREF)] = (
bindingHeaders.get(prefHeader(MISSING_PROP_PREF))
or descriptorsHaveInstrumentedProps
or descriptorsHaveNeedsMissingPropUseCounters
)
bindingHeaders["mozilla/dom/SimpleGlobalObject.h"] = any(
CGDictionary.dictionarySafeToJSONify(d) for d in dictionaries