aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/parser/callback-location.patch
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-08-24 12:47:53 -0500
committerGitHub <noreply@github.com>2016-08-24 12:47:53 -0500
commit1370fa5e3b38f3000c0b1439177cc7b7b81d380e (patch)
tree6237566538677cdcf5e07e8a6b0c9a72c298867c /components/script/dom/bindings/codegen/parser/callback-location.patch
parent77af4e26cee2f9c02c1da9085d243aad32c667c6 (diff)
parent86a0c45f87f28ef44f996e943aaab1e6c0206443 (diff)
downloadservo-1370fa5e3b38f3000c0b1439177cc7b7b81d380e.tar.gz
servo-1370fa5e3b38f3000c0b1439177cc7b7b81d380e.zip
Auto merge of #12819 - jdm:iterable2, r=nox
Support pair and value iterable WebIDL bindings The actual iterator implementation and JSAPI calls related to setting up the interface are ported directly from Gecko's Codegen.py, IterableIterator.h, and IterableIterator.webidl. The changes to support multiple interfaces in one file are required because the internal iterator interface the parser generates gets associated with the original interface's WebIDL file. It seemed like a good time to address #571 in that case. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12628 and fix #571. - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12819) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/parser/callback-location.patch')
-rw-r--r--components/script/dom/bindings/codegen/parser/callback-location.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/parser/callback-location.patch b/components/script/dom/bindings/codegen/parser/callback-location.patch
new file mode 100644
index 00000000000..ab6b0ae9b9b
--- /dev/null
+++ b/components/script/dom/bindings/codegen/parser/callback-location.patch
@@ -0,0 +1,22 @@
+diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py
+index da32340..81c52b7 100644
+--- a/components/script/dom/bindings/codegen/parser/WebIDL.py
++++ b/components/script/dom/bindings/codegen/parser/WebIDL.py
+@@ -2170,7 +2170,7 @@ class IDLUnresolvedType(IDLType):
+ return typedefType.complete(scope)
+ elif obj.isCallback() and not obj.isInterface():
+ assert self.name.name == obj.identifier.name
+- return IDLCallbackType(self.location, obj)
++ return IDLCallbackType(obj.location, obj)
+
+ if self._promiseInnerType and not self._promiseInnerType.isComplete():
+ self._promiseInnerType = self._promiseInnerType.complete(scope)
+@@ -6521,7 +6521,7 @@ class Parser(Tokenizer):
+ type = IDLTypedefType(self.getLocation(p, 1), obj.innerType,
+ obj.identifier.name)
+ elif obj.isCallback() and not obj.isInterface():
+- type = IDLCallbackType(self.getLocation(p, 1), obj)
++ type = IDLCallbackType(obj.location, obj)
+ else:
+ type = IDLWrapperType(self.getLocation(p, 1), p[1])
+ p[0] = self.handleModifiers(type, p[2]) \ No newline at end of file