diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index fdc80dcd5b6f..32e59c1ebcdd 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -878,7 +878,15 @@ def UnionConversions(descriptors, dictionaries, callbacks, config): if f.isSpiderMonkeyInterface(): headers.add("jsfriendapi.h") headers.add("mozilla/dom/TypedArray.h") - elif not f.inner.isExternal(): + elif f.inner.isExternal(): + providers = getRelevantProviders(descriptor, config) + for p in providers: + try: + typeDesc = p.getDescriptor(f.inner.identifier.name) + except NoSuchDescriptorError: + continue + headers.add(typeDesc.headerFile) + else: headers.add(CGHeaders.getDeclarationFilename(f.inner)) # Check for whether we have a possibly-XPConnect-implemented # interface. If we do, the right descriptor will come from