diff options
Diffstat (limited to 'src')
3 files changed, 64 insertions, 0 deletions
diff --git a/src/components/script/dom/bindings/codegen/parser/external.patch b/src/components/script/dom/bindings/codegen/parser/external.patch new file mode 100644 index 00000000000..9464511a9d0 --- /dev/null +++ b/src/components/script/dom/bindings/codegen/parser/external.patch @@ -0,0 +1,49 @@ +--- WebIDL.py ++++ WebIDL.py +@@ -450,44 +450,8 @@ class IDLIdentifierPlaceholder(IDLObjectWithIdentifier): + + 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) +- IDLObjectWithIdentifier.resolve(self, parentScope) +- +- def finish(self, scope): +- pass +- +- def validate(self): +- pass +- +- def isExternal(self): +- return True +- +- def isInterface(self): +- return True +- +- def isConsequential(self): +- return False +- +- def addExtendedAttributes(self, attrs): +- assert len(attrs) == 0 +- +- def resolve(self, parentScope): +- pass +- +- def getJSImplementation(self): +- return None +- +- def isJSImplemented(self): +- return False +- +- def getNavigatorProperty(self): +- return None +- +- def _getDependentObjects(self): +- return set() ++ raise WebIDLError("Servo does not support external interfaces.", ++ [self.location]) + + class IDLPartialInterface(IDLObject): + def __init__(self, location, name, members, nonPartialInterface): diff --git a/src/components/script/dom/bindings/codegen/parser/module.patch b/src/components/script/dom/bindings/codegen/parser/module.patch new file mode 100644 index 00000000000..977947b4c63 --- /dev/null +++ b/src/components/script/dom/bindings/codegen/parser/module.patch @@ -0,0 +1,12 @@ +--- WebIDL.py ++++ WebIDL.py +@@ -3398,6 +3398,9 @@ class IDLCallbackType(IDLType, IDLObjectWithScope): + self._treatNonCallableAsNull = False + self._treatNonObjectAsNull = False + ++ def module(self): ++ return self.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding' ++ + def isCallback(self): + return True + diff --git a/src/components/script/dom/bindings/codegen/parser/update.sh b/src/components/script/dom/bindings/codegen/parser/update.sh new file mode 100755 index 00000000000..5dd513812e1 --- /dev/null +++ b/src/components/script/dom/bindings/codegen/parser/update.sh @@ -0,0 +1,3 @@ +wget https://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py?raw=1 -O WebIDL.py +patch < external.patch +patch < module.patch |