Bug 473938 Stylesheets don't load without a safe browsing service r+sr=sicking
authorDave Camp <dcamp@mozilla.com>
Fri, 16 Jan 2009 21:54:39 +0000
changeset 23832 fb428e8612428c29c4d4e0d55d3b5af6f58c1e3c
parent 23831 8083041f33436caeea4774fa9b858484f9c97146
child 23833 d220fbb8ea6a58e7c304b29895c77d3a419ba20b
push id4749
push userneil@parkwaycc.co.uk
push dateFri, 16 Jan 2009 21:55:02 +0000
treeherdermozilla-central@fb428e861242 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs473938
milestone1.9.2a1pre
Bug 473938 Stylesheets don't load without a safe browsing service r+sr=sicking
content/base/src/nsObjectLoadingContent.cpp
docshell/base/nsDocShell.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -1749,20 +1749,16 @@ nsresult
 nsObjectLoadingContent::CheckClassifier(nsIChannel *aChannel)
 {
   nsresult rv;
   nsCOMPtr<nsIChannelClassifier> classifier =
     do_CreateInstance(NS_CHANNELCLASSIFIER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = classifier->Start(aChannel, PR_FALSE);
-  if (rv == NS_ERROR_FACTORY_NOT_REGISTERED) {
-    // no URI classifier, ignore this
-    return NS_OK;
-  }
   NS_ENSURE_SUCCESS(rv, rv);
 
   mClassifier = classifier;
 
   return NS_OK;
 }
 
 /* static */ PRBool
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -7793,21 +7793,16 @@ nsresult nsDocShell::DoChannelLoad(nsICh
 
 nsresult
 nsDocShell::CheckClassifier(nsIChannel *aChannel)
 {
     nsRefPtr<nsClassifierCallback> classifier = new nsClassifierCallback();
     if (!classifier) return NS_ERROR_OUT_OF_MEMORY;
 
     nsresult rv = classifier->Start(aChannel, PR_FALSE);
-    if (rv == NS_ERROR_FACTORY_NOT_REGISTERED ||
-        rv == NS_ERROR_NOT_AVAILABLE) {
-        // no URI classifier => ignored cases
-        return NS_OK;
-    }
     NS_ENSURE_SUCCESS(rv, rv);
 
     mClassifier = classifier;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -9744,17 +9739,22 @@ nsClassifierCallback::Run()
     rv = NS_URIChainHasFlags(uri,
                              nsIProtocolHandler::URI_IS_LOCAL_RESOURCE,
                              &hasFlags);
     NS_ENSURE_SUCCESS(rv, rv);
     if (hasFlags) return NS_OK;
 
     nsCOMPtr<nsIURIClassifier> uriClassifier =
         do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv);
-    if (NS_FAILED(rv)) return rv;
+    if (rv == NS_ERROR_FACTORY_NOT_REGISTERED ||
+        rv == NS_ERROR_NOT_AVAILABLE) {
+        // no URI classifier, ignore this failure.
+        return NS_OK;
+    }
+    NS_ENSURE_SUCCESS(rv, rv);
 
     PRBool expectCallback;
     rv = uriClassifier->Classify(uri, this, &expectCallback);
     if (NS_FAILED(rv)) return rv;
 
     if (expectCallback) {
         // Suspend the channel, it will be resumed when we get the classifier
         // callback.