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 158811 163279f146b9f0df9a0fb0cbdc4c2a7de6584247
parent 158810 2e7fee91e62ac2b092af04e65a3a6ccc8fb59877
child 158812 9b14d922a5141d47d2233e2fde16e00c4ef1b4bb
push id37086
push userryanvm@gmail.com
push dateThu, 05 Dec 2013 01:11:42 +0000
treeherdermozilla-inbound@178b13eade34 [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;