Backed out changeset 7a6e7570df3e (bug 1337056)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 15 Mar 2017 00:46:25 +0100
changeset 347574 36c22158aa94be8bbe82e970462a36b157f775e1
parent 347573 b4b5387adabe9cabf299ca25ea22a42df00511ca
child 347575 dd3ecc8e83179b40e50e39645b9efa7e53fda7d5
push id88056
push userarchaeopteryx@coole-files.de
push dateTue, 14 Mar 2017 23:47:27 +0000
treeherdermozilla-inbound@ba0c83461506 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1337056
milestone55.0a1
backs out7a6e7570df3e0ad8cd02b8b7524d85468377ce47
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
Backed out changeset 7a6e7570df3e (bug 1337056)
extensions/cookie/nsPermissionManager.cpp
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -34,17 +34,16 @@
 #include "mozilla/net/NeckoMessageUtils.h"
 #include "mozilla/Preferences.h"
 #include "nsReadLine.h"
 #include "mozilla/Telemetry.h"
 #include "nsIConsoleService.h"
 #include "nsINavHistoryService.h"
 #include "nsToolkitCompsCID.h"
 #include "nsIObserverService.h"
-#include "nsPrintfCString.h"
 
 static nsPermissionManager *gPermissionManager = nullptr;
 
 using mozilla::dom::ContentParent;
 using mozilla::Unused; // ha!
 
 static bool
 IsChildProcess()
@@ -593,34 +592,16 @@ nsPermissionManager::PermissionKey::Crea
                                                         nsresult& aResult)
 {
   nsAutoCString origin;
   aResult = GetOriginFromPrincipal(aPrincipal, origin);
   if (NS_WARN_IF(NS_FAILED(aResult))) {
     return nullptr;
   }
 
-#ifdef DEBUG
-  // Creating a PermissionsKey to look up a permission if we haven't had those keys
-  // synced down yet is problematic, so we do a check here and emit an assertion if
-  // we see it happening.
-  if (XRE_IsContentProcess()) {
-    nsAutoCString permissionKey;
-    GetKeyForPrincipal(aPrincipal, permissionKey);
-
-    // NOTE: Theoretically an addon could ask for permissions which the process
-    // wouldn't have access to, and we wouldn't want to crash the process in
-    // this case, but our chrome code should never do this. Using NS_ASSERTION
-    // here so that we can test fetching unavaliable permissions in tests.
-    NS_ASSERTION(gPermissionManager->mAvailablePermissionKeys.Contains(permissionKey),
-                 nsPrintfCString("This content process hasn't received the "
-                                 "permissions for %s yet", permissionKey.get()).get());
-  }
-#endif
-
   return new PermissionKey(origin);
 }
 
 /**
  * Simple callback used by |AsyncClose| to trigger a treatment once
  * the database is closed.
  *
  * Note: Beware that, if you hold onto a |CloseDatabaseListener| from a