Bug 1399280 - Use pair->Size() for nvFIFO::AddElement, like in RemoveElement. - r=nwgh
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 12 Sep 2017 15:53:16 -0700
changeset 432798 b2a36230e1936ff5e6554e3809274fa87e4297b1
parent 432797 4198b9d273b9db50b5ffe4cdd078da073d8483db
child 432799 50e7fe6b995e6f0d4906ea40415a9f6503a00bfe
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnwgh
bugs1399280
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1399280 - Use pair->Size() for nvFIFO::AddElement, like in RemoveElement. - r=nwgh MozReview-Commit-ID: 7YvsmMKUF2
netwerk/protocol/http/Http2Compression.cpp
--- 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());
 }