Bug 1651016 - Convert remaining NS_ENSURE_SUCCESS to CACHE_TRY in dom/cache; r=dom-workers-and-storage-reviewers,ttung,sg

Differential Revision: https://phabricator.services.mozilla.com/D84318
This commit is contained in:
Jan Varga 2020-07-24 11:47:35 +00:00
parent e2d6a2c2b3
commit 2c0b969ede
2 changed files with 4 additions and 2 deletions

View File

@ -13,11 +13,13 @@
#include "mozilla/dom/InternalResponse.h"
#include "mozilla/dom/RequestBinding.h"
#include "mozilla/dom/ResponseBinding.h"
#include "mozilla/dom/cache/CacheCommon.h"
#include "mozilla/dom/cache/CacheTypes.h"
#include "mozilla/dom/cache/SavedTypes.h"
#include "mozilla/dom/cache/Types.h"
#include "mozilla/dom/cache/TypeUtils.h"
#include "mozilla/net/MozURL.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/StaticPrefs_extensions.h"
#include "mozIStorageConnection.h"
#include "mozIStorageStatement.h"
@ -2760,8 +2762,7 @@ nsresult BindListParamsToQuery(mozIStorageStatement* aState,
MOZ_ASSERT(!NS_IsMainThread());
MOZ_DIAGNOSTIC_ASSERT((aPos + aLen) <= aEntryIdList.Length());
for (int32_t i = aPos; i < aLen; ++i) {
nsresult rv = aState->BindInt32ByIndex(i, aEntryIdList[i]);
NS_ENSURE_SUCCESS(rv, rv);
CACHE_TRY(aState->BindInt32ByIndex(i, aEntryIdList[i]));
}
return NS_OK;
}

1
dom/cache/moz.build vendored
View File

@ -15,6 +15,7 @@ EXPORTS.mozilla.dom.cache += [
'AutoUtils.h',
'Cache.h',
'CacheChild.h',
'CacheCommon.h',
'CacheOpChild.h',
'CacheOpParent.h',
'CacheParent.h',