Bug 1651016 - Convert remaining NS_ENSURE_TRUE to QM_TRY; r=ttung
☠☠ backed out by ded0022e1004 ☠ ☠
authorJan Varga <jvarga@mozilla.com>
Thu, 23 Jul 2020 18:29:02 +0000
changeset 541803 8f2aa854a083d3b5dd6b32b72a7cb6241e22c749
parent 541802 7f6eb1658a166a958281f7b900fff0f844897f99
child 541804 2f4529e62cd3bf1d3e6d8fec16006fc1180d8e6e
push id37633
push userccoroiu@mozilla.com
push dateFri, 24 Jul 2020 09:32:06 +0000
treeherdermozilla-central@141543043270 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttung
bugs1651016
milestone80.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 1651016 - Convert remaining NS_ENSURE_TRUE to QM_TRY; r=ttung Differential Revision: https://phabricator.services.mozilla.com/D83953
dom/quota/ActorsParent.cpp
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -7463,20 +7463,20 @@ nsresult QuotaManager::GetInfoFromPrinci
 nsresult QuotaManager::GetInfoFromWindow(nsPIDOMWindowOuter* aWindow,
                                          nsACString* aSuffix,
                                          nsACString* aGroup,
                                          nsACString* aOrigin) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aWindow);
 
   nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(aWindow);
-  NS_ENSURE_TRUE(sop, NS_ERROR_FAILURE);
+  QM_TRY(OkIf(sop), NS_ERROR_FAILURE);
 
   nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
-  NS_ENSURE_TRUE(principal, NS_ERROR_FAILURE);
+  QM_TRY(OkIf(principal), NS_ERROR_FAILURE);
 
   nsresult rv = GetInfoFromPrincipal(principal, aSuffix, aGroup, aOrigin);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 // static