diff options
author | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 18:15:07 +0200 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 18:15:07 +0200 |
commit | acfc69ec7e3470f8682e655af289a254a1c01a2d (patch) | |
tree | b4444e32bec834fe645fceb3b7c972831344c52b | |
parent | 709bc24e9110eba12f94cfcb8db00a8338ac4098 (diff) | |
download | uxp-acfc69ec7e3470f8682e655af289a254a1c01a2d.tar.gz |
Support string default values for unions containing USVString
-rw-r--r-- | dom/bindings/Codegen.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index cb93e4897f..5c4aa746d5 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", |