Bug 1318165 - nsStringStream should report correctly the size of the internal buffer. r=njn, a=jcristau
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 25 Nov 2016 08:24:51 +0100
changeset 368973 edb81858603dcc688ce16c6cb87f0c1911496239
parent 368972 160c08a8699e714b1b2c92d5b8a43c0a9e6107b9
child 368974 f8207e7d0e6bf06cc76dcd851570b4bb9a946059
push id1369
push userjlorenzo@mozilla.com
push dateMon, 27 Feb 2017 14:59:41 +0000
treeherdermozilla-release@d75a1dba431f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn, jcristau
bugs1318165
milestone52.0
Bug 1318165 - nsStringStream should report correctly the size of the internal buffer. r=njn, a=jcristau
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