Bug 1399727 - Fix double-reporting of memory in ScriptPreloader. r=kmag.

DMD indicates double-reporting for mURL, indicating that it is shared.

--HG--
extra : rebase_source : b6e82cc3e4dbba9a59750b6be8117597034f23d7
This commit is contained in:
Nicholas Nethercote 2017-09-14 15:09:50 +10:00
Родитель aa71407890
Коммит abfa282e96
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -269,8 +269,12 @@ private:
return size;
}
size += (mURL.SizeOfExcludingThisEvenIfShared(mallocSizeOf) +
// Note: mURL and mCachePath use the same string for scripts loaded
// by the message manager. The following statement avoids
// double-measuring in that case.
size += (mURL.SizeOfExcludingThisIfUnshared(mallocSizeOf) +
mCachePath.SizeOfExcludingThisEvenIfShared(mallocSizeOf));
return size;
}