Bug 1547114 - Part 3: Remove nsCookiePermission::mThirdPartyUtil; r=baku
☠☠ backed out by f13945ab88b1 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 26 Apr 2019 12:02:21 +0000
changeset 471490 0a4180b074ea47170eab34224cd5db2979a00263
parent 471489 c92df939a4d67e91075c44997687e0ffdb5dcac0
child 471491 4167117f548f41a9755a6710fc543674c8b2cc6b
push id35920
push useraiakab@mozilla.com
push dateFri, 26 Apr 2019 22:02:33 +0000
treeherdermozilla-central@b13f2b24ae62 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1547114
milestone68.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 1547114 - Part 3: Remove nsCookiePermission::mThirdPartyUtil; r=baku Differential Revision: https://phabricator.services.mozilla.com/D28916
extensions/cookie/nsCookiePermission.cpp
extensions/cookie/nsCookiePermission.h
--- a/extensions/cookie/nsCookiePermission.cpp
+++ b/extensions/cookie/nsCookiePermission.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 sw=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsCookiePermission.h"
 
-#include "mozIThirdPartyUtil.h"
 #include "nsICookie2.h"
 #include "nsIServiceManager.h"
 #include "nsICookieManager.h"
 #include "nsICookieService.h"
 #include "nsNetUtil.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIProtocolHandler.h"
 #include "nsIURI.h"
@@ -55,18 +54,16 @@ void nsCookiePermission::Shutdown() { gS
 
 bool nsCookiePermission::Init() {
   // Initialize nsIPermissionManager and fetch relevant prefs. This is only
   // required for some methods on nsICookiePermission, so it should be done
   // lazily.
   nsresult rv;
   mPermMgr = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return false;
-  mThirdPartyUtil = do_GetService(THIRDPARTYUTIL_CONTRACTID, &rv);
-  if (NS_FAILED(rv)) return false;
 
   return true;
 }
 
 NS_IMETHODIMP
 nsCookiePermission::SetAccess(nsIURI *aURI, nsCookieAccess aAccess) {
   // Lazily initialize ourselves
   if (!EnsureInitialized()) return NS_ERROR_UNEXPECTED;
--- a/extensions/cookie/nsCookiePermission.h
+++ b/extensions/cookie/nsCookiePermission.h
@@ -3,34 +3,29 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsCookiePermission_h__
 #define nsCookiePermission_h__
 
 #include "nsICookiePermission.h"
 #include "nsIPermissionManager.h"
 #include "nsCOMPtr.h"
-#include "mozIThirdPartyUtil.h"
-
 
 class nsCookiePermission final : public nsICookiePermission {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOOKIEPERMISSION
 
   // Singleton accessor
   static already_AddRefed<nsICookiePermission> GetOrCreate();
   static void Shutdown();
 
   bool Init();
 
  private:
   ~nsCookiePermission() = default;
 
-  bool EnsureInitialized() {
-    return (mPermMgr != nullptr && mThirdPartyUtil != nullptr) || Init();
-  };
+  bool EnsureInitialized() { return (mPermMgr != nullptr) || Init(); };
 
   nsCOMPtr<nsIPermissionManager> mPermMgr;
-  nsCOMPtr<mozIThirdPartyUtil> mThirdPartyUtil;
 };
 
 #endif