зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1674968 - Fix UniqueJSONStrings copy constructor, to actually copy from the source - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D95833
This commit is contained in:
Родитель
896ddd992a
Коммит
2fd5e93f78
|
@ -15,7 +15,7 @@ UniqueJSONStrings::UniqueJSONStrings(JSONWriter::CollectionStyle aStyle) {
|
|||
UniqueJSONStrings::UniqueJSONStrings(const UniqueJSONStrings& aOther,
|
||||
JSONWriter::CollectionStyle aStyle) {
|
||||
mStringTableWriter.StartBareList(aStyle);
|
||||
uint32_t count = mStringHashToIndexMap.count();
|
||||
uint32_t count = aOther.mStringHashToIndexMap.count();
|
||||
if (count != 0) {
|
||||
MOZ_RELEASE_ASSERT(mStringHashToIndexMap.reserve(count));
|
||||
for (auto iter = aOther.mStringHashToIndexMap.iter(); !iter.done();
|
||||
|
|
|
@ -3719,9 +3719,6 @@ void TestUniqueJSONStrings() {
|
|||
"2, 3, 2", R"("external0", "external1", "string0", "string1")", &ujs);
|
||||
}
|
||||
|
||||
// This currently fails, demonstrating the regression from bug 1520104, to be
|
||||
// fixed in the next patch in bug 1674968.
|
||||
# if 0
|
||||
// Unique string table with pre-existing data from another table.
|
||||
{
|
||||
UJS ujs(mozilla::JSONWriter::SingleLineStyle);
|
||||
|
@ -3740,7 +3737,6 @@ void TestUniqueJSONStrings() {
|
|||
},
|
||||
"2, 3, 2", R"("external0", "external1", "string0", "string1")", &ujs);
|
||||
}
|
||||
# endif
|
||||
|
||||
printf("TestUniqueJSONStrings done\n");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче