aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/Configuration.py
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r--components/script/dom/bindings/codegen/Configuration.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py
index d0af7e37929..0fa06c83ea7 100644
--- a/components/script/dom/bindings/codegen/Configuration.py
+++ b/components/script/dom/bindings/codegen/Configuration.py
@@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-from WebIDL import IDLInterface
+from WebIDL import IDLExternalInterface, IDLInterface, WebIDLError
class Configuration:
@@ -23,6 +23,11 @@ class Configuration:
self.interfaces = {}
self.maxProtoChainLength = 0
for thing in parseData:
+ # Servo does not support external interfaces.
+ if isinstance(thing, IDLExternalInterface):
+ raise WebIDLError("Servo does not support external interfaces.",
+ [thing.location])
+
# Some toplevel things are sadly types, and those have an
# isInterface that doesn't mean the same thing as IDLObject's
# isInterface()...
@@ -345,6 +350,10 @@ class Descriptor(DescriptorProvider):
# Some utility methods
+def getModuleFromObject(object):
+ return object.location.filename().split('/')[-1].split('.webidl')[0] + 'Binding'
+
+
def getTypesFromDescriptor(descriptor):
"""
Get all argument and return types for all members of the descriptor