From 29f544b623054ac38152e57a2809b91b43e35bd5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 26 Sep 2019 14:35:58 +0000 Subject: [PATCH] Bug 1423562 part 2. Change external interfaces to not have exposure sets. r=edgar This avoids us needing to stick [Exposed=Window] on all of them. Differential Revision: https://phabricator.services.mozilla.com/D46696 --HG-- extra : moz-landing-system : lando --- dom/bindings/parser/WebIDL.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py index e9bb2981c90a..fe06a074c7a8 100644 --- a/dom/bindings/parser/WebIDL.py +++ b/dom/bindings/parser/WebIDL.py @@ -511,17 +511,15 @@ class IDLExposureMixins(): return workerDebuggerScopes.intersection(self.exposureSet) -class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins): +class IDLExternalInterface(IDLObjectWithIdentifier): def __init__(self, location, parentScope, identifier): assert isinstance(identifier, IDLUnresolvedIdentifier) assert isinstance(parentScope, IDLScope) self.parent = None IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier) - IDLExposureMixins.__init__(self, location) IDLObjectWithIdentifier.resolve(self, parentScope) def finish(self, scope): - IDLExposureMixins.finish(self, scope) pass def validate(self): @@ -2997,8 +2995,9 @@ class IDLWrapperType(IDLType): return True iface = self.inner if iface.isExternal(): - # Let's say true, though ideally we'd only do this when - # exposureSet contains the primary global's name. + # Let's say true, so we don't have to implement exposure mixins on + # external interfaces and sprinkle [Exposed=Window] on every single + # external interface declaration. return True return iface.exposureSet.issuperset(exposureSet)