aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/Configuration.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-12-16 15:19:25 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-12-16 15:19:25 +0530
commit9c4ca39ebe57502b74d75aa9d6953b017d884f54 (patch)
tree424666fbb21011c594cbbd48b172ec989a5bccbb /components/script/dom/bindings/codegen/Configuration.py
parent1695c0ad27e4c9c062e26a5db154521e400ecbd9 (diff)
parentc1718a0b1fb227df2fcad4394a65d430af404ab0 (diff)
downloadservo-9c4ca39ebe57502b74d75aa9d6953b017d884f54.tar.gz
servo-9c4ca39ebe57502b74d75aa9d6953b017d884f54.zip
Auto merge of #8055 - nox:rm-webidl-patches, r=Ms2ger
Remove all our patches to the WebIDL parser All the tweaks we need can just be made through Configuration.py. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8055) <!-- Reviewable:end -->
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