Backed out changeset 74df8f458a42 (bug 1274516) for bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 06 Jul 2016 16:13:19 +0200
changeset 341858 6eaa86d11a5c5dad67d5ca343e5d9226ff524517
parent 341857 65d24c58d45069b3433dea3a2d30726083f5781f
child 341859 cc79c0fdd28e655a62363222b2970c9a994d779b
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1274516
milestone49.0a2
backs out74df8f458a42a81ca54f36ee81cb77bf8eab040b
Backed out changeset 74df8f458a42 (bug 1274516) for bustage
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/PContent.ipdl
image/imgLoader.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -55,17 +55,16 @@
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/plugins/PluginInstanceParent.h"
 #include "mozilla/plugins/PluginModuleParent.h"
 #include "mozilla/widget/WidgetMessageUtils.h"
 #include "nsBaseDragService.h"
 #include "mozilla/media/MediaChild.h"
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/WebBrowserPersistDocumentChild.h"
-#include "imgLoader.h"
 
 #if defined(MOZ_CONTENT_SANDBOX)
 #if defined(XP_WIN)
 #define TARGET_SANDBOX_EXPORTS
 #include "mozilla/sandboxTarget.h"
 #elif defined(XP_LINUX)
 #include "mozilla/Sandbox.h"
 #include "mozilla/SandboxInfo.h"
@@ -2238,26 +2237,16 @@ ContentChild::RecvRegisterChromeItem(con
       MOZ_ASSERT(false, "bad chrome item");
       return false;
   }
 
   return true;
 }
 
 bool
-ContentChild::RecvClearImageCache(const bool& privateLoader, const bool& chrome)
-{
-  imgLoader* loader = privateLoader ? imgLoader::PrivateBrowsingLoader() :
-                                      imgLoader::NormalLoader();
-
-  loader->ClearCache(chrome);
-  return true;
-}
-
-bool
 ContentChild::RecvSetOffline(const bool& offline)
 {
   nsCOMPtr<nsIIOService> io (do_GetIOService());
   NS_ASSERTION(io, "IO Service can not be null");
 
   io->SetOffline(offline);
 
   return true;
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -382,19 +382,16 @@ public:
 
   virtual bool RecvRegisterChrome(InfallibleTArray<ChromePackage>&& packages,
                                   InfallibleTArray<SubstitutionMapping>&& resources,
                                   InfallibleTArray<OverrideMapping>&& overrides,
                                   const nsCString& locale,
                                   const bool& reset) override;
   virtual bool RecvRegisterChromeItem(const ChromeRegistryItem& item) override;
 
-  virtual bool RecvClearImageCache(const bool& privateLoader,
-                                   const bool& chrome) override;
-
   virtual mozilla::jsipc::PJavaScriptChild* AllocPJavaScriptChild() override;
 
   virtual bool DeallocPJavaScriptChild(mozilla::jsipc::PJavaScriptChild*) override;
 
   virtual PRemoteSpellcheckEngineChild* AllocPRemoteSpellcheckEngineChild() override;
 
   virtual bool DeallocPRemoteSpellcheckEngineChild(PRemoteSpellcheckEngineChild*) override;
 
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -509,18 +509,16 @@ child:
     async PTestShell();
 
     async PAPZ(TabId tabId);
 
     async RegisterChrome(ChromePackage[] packages, SubstitutionMapping[] substitutions,
                          OverrideMapping[] overrides, nsCString locale, bool reset);
     async RegisterChromeItem(ChromeRegistryItem item);
 
-    async ClearImageCache(bool privateLoader, bool chrome);
-
     async SetOffline(bool offline);
     async SetConnectivity(bool connectivity);
 
     async NotifyVisited(URIParams uri);
 
     async SystemMemoryAvailable(uint64_t getterId, uint32_t memoryAvailable);
 
     async PreferenceUpdate(PrefSetting pref);
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -3,17 +3,17 @@
 /* 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 "mozilla/Attributes.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/Move.h"
 #include "mozilla/Preferences.h"
-#include "mozilla/ChaosMode.h"
+ #include "mozilla/ChaosMode.h"
 
 #include "ImageLogging.h"
 #include "nsImageModule.h"
 #include "nsPrintfCString.h"
 #include "imgLoader.h"
 #include "imgRequestProxy.h"
 
 #include "nsCOMPtr.h"
@@ -32,17 +32,16 @@
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIProgressEventSink.h"
 #include "nsIChannelEventSink.h"
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "nsIFileURL.h"
 #include "nsIFile.h"
 #include "nsCRT.h"
 #include "nsINetworkPredictor.h"
-#include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/nsMixedContentBlocker.h"
 
 #include "nsIApplicationCache.h"
 #include "nsIApplicationCacheContainer.h"
 
 #include "nsIMemoryReporter.h"
 #include "DecoderFactory.h"
 #include "Image.h"
@@ -53,17 +52,16 @@
 // so we can associate the document URI with the load group.
 // until this point, we have an evil hack:
 #include "nsIHttpChannelInternal.h"
 #include "nsILoadContext.h"
 #include "nsILoadGroupChild.h"
 #include "nsIDOMDocument.h"
 
 using namespace mozilla;
-using namespace mozilla::dom;
 using namespace mozilla::image;
 using namespace mozilla::net;
 
 MOZ_DEFINE_MALLOC_SIZE_OF(ImagesMallocSizeOf)
 
 class imgMemoryReporter final : public nsIMemoryReporter
 {
   ~imgMemoryReporter() { }
@@ -1341,23 +1339,16 @@ void imgLoader::ReadAcceptHeaderPref()
     mAcceptHeader =
         IMAGE_PNG "," IMAGE_WILDCARD ";q=0.8," ANY_WILDCARD ";q=0.5";
   }
 }
 
 NS_IMETHODIMP
 imgLoader::ClearCache(bool chrome)
 {
-  if (XRE_IsParentProcess()) {
-    bool privateLoader = this == gPrivateBrowsingLoader;
-    for (auto* cp : ContentParent::AllProcesses(ContentParent::eLive)) {
-      Unused << cp->SendClearImageCache(privateLoader, chrome);
-    }
-  }
-
   if (chrome) {
     return ClearChromeImageCache();
   } else {
     return ClearImageCache();
   }
 }
 
 NS_IMETHODIMP