aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/parser
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2019-06-27 17:35:20 -0700
committerManish Goregaokar <manishsmail@gmail.com>2019-06-27 18:13:23 -0700
commit3c7ceff46d38d78971ca2d011d7c86a1835d787e (patch)
treeb387862fcd4c652925c1d56304786f840020652a /components/script/dom/bindings/codegen/parser
parent9e12b4175eb7b93df9667557ec1e185de0983f28 (diff)
downloadservo-3c7ceff46d38d78971ca2d011d7c86a1835d787e.tar.gz
servo-3c7ceff46d38d78971ca2d011d7c86a1835d787e.zip
Improve support for nested dictionaries
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
-rw-r--r--components/script/dom/bindings/codegen/parser/WebIDL.py3
-rw-r--r--components/script/dom/bindings/codegen/parser/undo-dictionary-optional.patch12
-rwxr-xr-xcomponents/script/dom/bindings/codegen/parser/update.sh1
3 files changed, 2 insertions, 14 deletions
diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py
index 31692bd1a2e..df88cf120dd 100644
--- a/components/script/dom/bindings/codegen/parser/WebIDL.py
+++ b/components/script/dom/bindings/codegen/parser/WebIDL.py
@@ -4611,7 +4611,8 @@ class IDLArgument(IDLObjectWithIdentifier):
if ((self.type.isDictionary() or
self.type.isUnion() and self.type.unroll().hasDictionaryType()) and
- self.optional and not self.defaultValue and not self.variadic):
+ self.optional and not self.defaultValue and not self.variadic and
+ not self.dictionaryMember):
# Default optional non-variadic dictionary arguments to null,
# for simplicity, so the codegen doesn't have to special-case this.
self.defaultValue = IDLNullValue(self.location)
diff --git a/components/script/dom/bindings/codegen/parser/undo-dictionary-optional.patch b/components/script/dom/bindings/codegen/parser/undo-dictionary-optional.patch
deleted file mode 100644
index b414a536415..00000000000
--- a/components/script/dom/bindings/codegen/parser/undo-dictionary-optional.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- WebIDL.py
-+++ WebIDL.py
-@@ -4570,8 +4570,7 @@ class IDLArgument(IDLObjectWithIdentifier):
-
- if ((self.type.isDictionary() or
- self.type.isUnion() and self.type.unroll().hasDictionaryType()) and
-- self.optional and not self.defaultValue and not self.variadic and
-- not self.dictionaryMember):
-+ self.optional and not self.defaultValue and not self.variadic):
- # Default optional non-variadic dictionary arguments to null,
- # for simplicity, so the codegen doesn't have to special-case this.
- self.defaultValue = IDLNullValue(self.location)
diff --git a/components/script/dom/bindings/codegen/parser/update.sh b/components/script/dom/bindings/codegen/parser/update.sh
index 0386b0294fe..213aba6df89 100755
--- a/components/script/dom/bindings/codegen/parser/update.sh
+++ b/components/script/dom/bindings/codegen/parser/update.sh
@@ -5,7 +5,6 @@ patch < pref-main-thread.patch
patch < callback-location.patch
patch < union-typedef.patch
patch < inline.patch
-patch < undo-dictionary-optional.patch
wget https://hg.mozilla.org/mozilla-central/archive/tip.tar.gz/dom/bindings/parser/tests/ -O tests.tar.gz
rm -r tests