summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustOff <Off.Just.Off@gmail.com>2019-03-13 18:15:07 +0200
committerJustOff <Off.Just.Off@gmail.com>2019-03-13 18:15:07 +0200
commitacfc69ec7e3470f8682e655af289a254a1c01a2d (patch)
treeb4444e32bec834fe645fceb3b7c972831344c52b
parent709bc24e9110eba12f94cfcb8db00a8338ac4098 (diff)
downloadUXP-acfc69ec7e3470f8682e655af289a254a1c01a2d.tar
UXP-acfc69ec7e3470f8682e655af289a254a1c01a2d.tar.gz
UXP-acfc69ec7e3470f8682e655af289a254a1c01a2d.tar.lz
UXP-acfc69ec7e3470f8682e655af289a254a1c01a2d.tar.xz
UXP-acfc69ec7e3470f8682e655af289a254a1c01a2d.zip
Support string default values for unions containing USVString
-rw-r--r--dom/bindings/Codegen.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py
index cb93e4897..5c4aa746d 100644
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -4355,7 +4355,9 @@ def handleDefaultStringValue(defaultValue, method):
passing as the second argument of handleDefault; in particular it does not
end with a ';'
"""
- assert defaultValue.type.isDOMString() or defaultValue.type.isByteString()
+ assert (defaultValue.type.isDOMString() or
+ defaultValue.type.isUSVString() or
+ defaultValue.type.isByteString())
return ("static const %(char_t)s data[] = { %(data)s };\n"
"%(method)s(data, ArrayLength(data) - 1)") % {
'char_t': "char" if defaultValue.type.isByteString() else "char16_t",