Bug 1318165 - nsStringStream should report correctly the size of the internal buffer, r=njn
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 25 Nov 2016 08:24:51 +0100
changeset 324287 0b6635a4c87d88ac36f88073839e5d7191da798b
parent 324286 1f2ff51b2169fb0f003ef920f7955f03a20c95a0
child 324288 fcf8c42bf382cd0e25fa47e16819072577f153e5
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersnjn
bugs1318165
milestone53.0a1
Bug 1318165 - nsStringStream should report correctly the size of the internal buffer, r=njn
xpcom/io/nsStringStream.cpp
--- a/xpcom/io/nsStringStream.cpp
+++ b/xpcom/io/nsStringStream.cpp
@@ -193,17 +193,17 @@ nsStringInputStream::ShareData(const cha
   mOffset = 0;
   return NS_OK;
 }
 
 NS_IMETHODIMP_(size_t)
 nsStringInputStream::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf)
 {
   size_t n = aMallocSizeOf(this);
-  n += mData.SizeOfIncludingThisIfUnshared(aMallocSizeOf);
+  n += mData.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
   return n;
 }
 
 /////////
 // nsIInputStream implementation
 /////////
 
 NS_IMETHODIMP