Backed out changeset 1548ffd8f48c (bug 1522054) for mochitest failures at test_lookup_system_principal.html. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Wed, 06 Nov 2019 01:11:51 +0200
changeset 500746 3a1a724d7b7bbe9a3abddb48f6e1229546b07810
parent 500745 69081f526e73f5460c4160ac1d3b64ef9e797af1
child 500747 b2d3abd657660140762e4354643a805445e02cd6
push id114166
push userapavel@mozilla.com
push dateThu, 07 Nov 2019 10:04:01 +0000
treeherdermozilla-inbound@d271c572a9bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1522054
milestone72.0a1
backs out1548ffd8f48ca29f49d1e8f2a92e2cc314c1e12e
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 1548ffd8f48c (bug 1522054) for mochitest failures at test_lookup_system_principal.html. CLOSED TREE
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -2026,26 +2026,27 @@ nsUrlClassifierDBService::SendThreatHitR
     return rv;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsUrlClassifierDBService::Lookup(nsIPrincipal* aPrincipal,
-                                 const nsACString& aTables,
-                                 nsIUrlClassifierCallback* aCallback) {
-  // We don't expect someone with SystemPrincipal calls this API(See Bug
-  // 813897).
-  MOZ_ASSERT(!nsContentUtils::IsSystemPrincipal(aPrincipal));
-
+                                 const nsACString& tables,
+                                 nsIUrlClassifierCallback* c) {
   NS_ENSURE_TRUE(gDbBackgroundThread, NS_ERROR_NOT_INITIALIZED);
 
+  if (nsContentUtils::IsSystemPrincipal(aPrincipal)) {
+    // FIXME: we don't call 'c' here!
+    return NS_OK;
+  }
+
   nsTArray<nsCString> tableArray;
-  Classifier::SplitTables(aTables, tableArray);
+  Classifier::SplitTables(tables, tableArray);
 
   nsCOMPtr<nsIUrlClassifierFeature> feature;
   nsresult rv =
       CreateFeatureWithTables(NS_LITERAL_CSTRING("lookup"), tableArray,
                               nsTArray<nsCString>(), getter_AddRefs(feature));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIURI> uri;
@@ -2071,17 +2072,17 @@ nsUrlClassifierDBService::Lookup(nsIPrin
     return NS_ERROR_FAILURE;
   }
 
   nsAutoCString key;
   // Canonicalize the url
   rv = utilsService->GetKeyForURI(uri, key);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  return LookupURI(key, holder, aCallback);
+  return LookupURI(key, holder, c);
 }
 
 nsresult nsUrlClassifierDBService::LookupURI(
     const nsACString& aKey, FeatureHolder* aHolder,
     nsIUrlClassifierCallback* aCallback) {
   MOZ_ASSERT(aHolder);
   MOZ_ASSERT(aCallback);