Backed out changeset b6cd0cc8c045; it landed on the wrong branch. GECKO330b3_2014091121_RELBRANCH
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 12 Sep 2014 16:22:23 +1200
branchGECKO330b3_2014091121_RELBRANCH
changeset 217832 9aa9611df8e60f8b8308e5b1fa362fbe78d32f2d
parent 217831 b6cd0cc8c045d069fd1597e2754ca4d62082f4d7
child 236431 9d7dc7458c8f74e8fd7f6da2b35ac8ff9c937f65
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone33.0
backs outb6cd0cc8c045d069fd1597e2754ca4d62082f4d7
Backed out changeset b6cd0cc8c045; it landed on the wrong branch.
layout/style/nsLayoutStylesheetCache.cpp
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -11,17 +11,16 @@
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/css/Loader.h"
 #include "nsIFile.h"
 #include "nsNetUtil.h"
 #include "nsIObserverService.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIXULRuntime.h"
-#include "nsPrintfCString.h"
 
 using namespace mozilla;
 
 static bool sNumberControlEnabled;
 
 #define NUMBER_CONTROL_PREF "dom.forms.number"
 
 NS_IMPL_ISUPPORTS(
@@ -424,52 +423,34 @@ nsLayoutStylesheetCache::LoadSheetFile(n
   if (!exists) return;
 
   nsCOMPtr<nsIURI> uri;
   NS_NewFileURI(getter_AddRefs(uri), aFile);
 
   LoadSheet(uri, aSheet, false);
 }
 
-static void
-ErrorLoadingBuiltinSheet(nsIURI* aURI, const char* aMsg)
-{
-  nsAutoCString spec;
-  if (aURI) {
-    aURI->GetSpec(spec);
-  }
-  NS_RUNTIMEABORT(nsPrintfCString("%s loading built-in stylesheet '%s'",
-                                  aMsg, spec.get()).get());
-}
-
 void
 nsLayoutStylesheetCache::LoadSheet(nsIURI* aURI,
                                    nsRefPtr<CSSStyleSheet>& aSheet,
                                    bool aEnableUnsafeRules)
 {
   if (!aURI) {
-    ErrorLoadingBuiltinSheet(aURI, "null URI");
+    NS_ERROR("Null URI. Out of memory?");
     return;
   }
 
   if (!gCSSLoader) {
     gCSSLoader = new mozilla::css::Loader();
     NS_IF_ADDREF(gCSSLoader);
-    if (!gCSSLoader) {
-      ErrorLoadingBuiltinSheet(aURI, "no Loader");
-      return;
-    }
   }
 
-
-  nsresult rv = gCSSLoader->LoadSheetSync(aURI, aEnableUnsafeRules, true,
-                                          getter_AddRefs(aSheet));
-  if (NS_FAILED(rv)) {
-    ErrorLoadingBuiltinSheet(aURI,
-      nsPrintfCString("LoadSheetSync failed with error %x", rv).get());
+  if (gCSSLoader) {
+    gCSSLoader->LoadSheetSync(aURI, aEnableUnsafeRules, true,
+                              getter_AddRefs(aSheet));
   }
 }
 
 mozilla::StaticRefPtr<nsLayoutStylesheetCache>
 nsLayoutStylesheetCache::gStyleCache;
 
 mozilla::css::Loader*
 nsLayoutStylesheetCache::gCSSLoader = nullptr;