Bug 1258339 - check return value of GetFileSize. r=janv
authorAndi-Bogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Mon, 21 Mar 2016 15:17:04 +0200
changeset 289647 a84154aad44223a19b921da59aa49c1790bd0c9a
parent 289646 8dcde91472ccc214bd8cc5acbfa5a387f44aeb5c
child 289648 2458e4f39d35937ba6346051275ce18f93507ca1
push id30108
push usercbook@mozilla.com
push dateTue, 22 Mar 2016 11:14:31 +0000
treeherdermozilla-central@ea6298e1b4f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanv
bugs1258339
milestone48.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 1258339 - check return value of GetFileSize. r=janv MozReview-Commit-ID: Fy0jMfVpcCN
dom/indexedDB/ActorsParent.cpp
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -10910,18 +10910,18 @@ UpdateRefcountFunction::Reset()
         return NS_ERROR_FAILURE;
       }
 
       nsresult rv;
       int64_t fileSize;
 
       if (aFileManager->EnforcingQuota()) {
         rv = file->GetFileSize(&fileSize);
-        if (NS_WARN_IF(!file)) {
-          return NS_ERROR_FAILURE;
+        if (NS_WARN_IF(NS_FAILED(rv))) {
+          return rv;
         }
       }
 
       rv = file->Remove(false);
       if (NS_WARN_IF(NS_FAILED(rv))) {
         return rv;
       }