зеркало из https://github.com/mozilla/gecko-dev.git
Bug 779573 - Fix generated code for empty string as default dictionary member in WebIDL. r=khuey
This commit is contained in:
Родитель
aaae91f92f
Коммит
103cc37839
|
@ -2056,9 +2056,9 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
"%s.SetNull()" % varName)
|
||||
return handleDefault(
|
||||
conversionCode,
|
||||
("static const PRUnichar data[] = { %s, 0 };\n"
|
||||
("static const PRUnichar data[] = { %s };\n"
|
||||
"%s.SetData(data, ArrayLength(data) - 1)" %
|
||||
(", ".join("'" + char + "'" for char in defaultValue.value),
|
||||
(", ".join(["'" + char + "'" for char in defaultValue.value] + ["0"]),
|
||||
varName)))
|
||||
|
||||
if isMember:
|
||||
|
|
|
@ -357,6 +357,7 @@ dictionary Dict : ParentDict {
|
|||
long b = 8;
|
||||
long z = 9;
|
||||
DOMString str;
|
||||
DOMString empty = "";
|
||||
TestEnum otherEnum = "b";
|
||||
DOMString otherStr = "def";
|
||||
DOMString? yetAnotherStr = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче