Bug 1399280 - Use pair->Size() for nvFIFO::AddElement, like in RemoveElement. - r=mcmanus
MozReview-Commit-ID: 7YvsmMKUF2
--- a/netwerk/protocol/http/Http2Compression.cpp
+++ b/netwerk/protocol/http/Http2Compression.cpp
@@ -204,18 +204,18 @@ nvFIFO::nvFIFO()
nvFIFO::~nvFIFO()
{
Clear();
}
void
nvFIFO::AddElement(const nsCString &name, const nsCString &value)
{
- mByteCount += name.Length() + value.Length() + 32;
nvPair *pair = new nvPair(name, value);
+ mByteCount += pair->Size();
mTable.PushFront(pair);
}
void
nvFIFO::AddElement(const nsCString &name)
{
AddElement(name, EmptyCString());
}