mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1619260 - Prevent assertion when processing nsStringBuffer leaks. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64949 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
232e9231e5
commit
2d1ae94059
@ -331,8 +331,7 @@ static void DumpSerialNumbers(const SerialHash::Iterator& aHashEntry, FILE* aFd,
|
||||
// This output will be wrong if the nsStringBuffer was used to
|
||||
// store a char16_t string.
|
||||
auto* buffer = static_cast<const nsStringBuffer*>(aHashEntry.Key());
|
||||
nsDependentCString bufferString(static_cast<char*>(buffer->Data()),
|
||||
buffer->StorageSize() - 1);
|
||||
nsDependentCString bufferString(static_cast<char*>(buffer->Data()));
|
||||
fprintf(outputFile,
|
||||
"Contents of leaked nsStringBuffer with storage size %d as a "
|
||||
"char*: %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user