Bug 938687 - Check the value of PR_Close() and issue warning when it is not PR_SUCCESS. r=bsmedberg
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Wed, 04 Dec 2013 17:46:20 -0500
changeset 174472 163279f146b9f0df9a0fb0cbdc4c2a7de6584247
parent 174471 2e7fee91e62ac2b092af04e65a3a6ccc8fb59877
child 174473 9b14d922a5141d47d2233e2fde16e00c4ef1b4bb
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)
reviewersbsmedberg
bugs938687
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 938687 - Check the value of PR_Close() and issue warning when it is not PR_SUCCESS. r=bsmedberg
dom/ipc/TabParent.cpp
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -174,17 +174,21 @@ private:
     void CloseFile()
     {
         // It's possible for this to happen on the main thread if the dispatch
         // to the stream service fails after we've already opened the file so
         // we can't assert the thread we're running on.
 
         MOZ_ASSERT(mFD);
 
-        PR_Close(mFD);
+        PRStatus prrc;
+        prrc = PR_Close(mFD);
+        if (prrc != PR_SUCCESS) {
+          NS_ERROR("PR_Close() failed.");
+        }
         mFD = nullptr;
     }
 };
 
 namespace mozilla {
 namespace dom {
 
 TabParent* sEventCapturer;