зеркало из 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)
|
"%s.SetNull()" % varName)
|
||||||
return handleDefault(
|
return handleDefault(
|
||||||
conversionCode,
|
conversionCode,
|
||||||
("static const PRUnichar data[] = { %s, 0 };\n"
|
("static const PRUnichar data[] = { %s };\n"
|
||||||
"%s.SetData(data, ArrayLength(data) - 1)" %
|
"%s.SetData(data, ArrayLength(data) - 1)" %
|
||||||
(", ".join("'" + char + "'" for char in defaultValue.value),
|
(", ".join(["'" + char + "'" for char in defaultValue.value] + ["0"]),
|
||||||
varName)))
|
varName)))
|
||||||
|
|
||||||
if isMember:
|
if isMember:
|
||||||
|
|
|
@ -357,6 +357,7 @@ dictionary Dict : ParentDict {
|
||||||
long b = 8;
|
long b = 8;
|
||||||
long z = 9;
|
long z = 9;
|
||||||
DOMString str;
|
DOMString str;
|
||||||
|
DOMString empty = "";
|
||||||
TestEnum otherEnum = "b";
|
TestEnum otherEnum = "b";
|
||||||
DOMString otherStr = "def";
|
DOMString otherStr = "def";
|
||||||
DOMString? yetAnotherStr = null;
|
DOMString? yetAnotherStr = null;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче