Bug 938407 - Null check FinishReportingCallback::mFinishDumping. r=froydnj
authorAndrew McCreight <continuation@gmail.com>
Mon, 02 Dec 2013 13:11:43 -0800
changeset 174024 a7731ef783483203d26cc378581c142b24650952
parent 174023 f3174f0757c883fca4bf3307f277a69bba8731b1
child 174025 f7330220c26d10fd651acea98b81d68188a0c86e
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs938407
milestone28.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 938407 - Null check FinishReportingCallback::mFinishDumping. r=froydnj
xpcom/base/nsMemoryInfoDumper.cpp
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -1042,16 +1042,20 @@ public:
     NS_ENSURE_TRUE(writer, NS_ERROR_FAILURE);
 
     nsresult rv = DumpFooter(writer);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = writer->Finish();
     NS_ENSURE_SUCCESS(rv, rv);
 
+    if (!mFinishDumping) {
+      return NS_OK;
+    }
+
     return mFinishDumping->Callback(mFinishDumpingData);
   }
 
 private:
   nsCOMPtr<nsIFinishDumpingCallback> mFinishDumping;
   nsCOMPtr<nsISupports> mFinishDumpingData;
 };