Backed out changeset b3924432ba21 (bug 1287362) for xpcshell crashes
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 19 Jul 2016 14:07:09 +0200
changeset 305509 777e1b279e39612fd7d86c5d9e886b4ed5a625a0
parent 305508 bb8c7f43c8011d8d86cf36fcc8561962bdbbf0ac
child 305510 5c12f81ec7f999d8c6140f2dd6bd91d03513cff1
push id79605
push usercbook@mozilla.com
push dateTue, 19 Jul 2016 12:10:15 +0000
treeherdermozilla-inbound@777e1b279e39 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1287362
milestone50.0a1
backs outb3924432ba210bd01f7e74124d39a92ce0406ce3
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 b3924432ba21 (bug 1287362) for xpcshell crashes
gfx/layers/ipc/CompositorBridgeParent.cpp
gfx/layers/ipc/CompositorLRU.cpp
gfx/thebes/gfxPrefs.h
layout/build/nsLayoutStatics.cpp
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -622,18 +622,16 @@ CompositorBridgeParent::CompositorBridge
   , mLastPluginUpdateLayerTreeId(0)
   , mDeferPluginWindows(false)
   , mPluginWindowsHidden(false)
 #endif
 {
   // Always run destructor on the main thread
   MOZ_ASSERT(NS_IsMainThread());
   SetMessageLoopToPostDestructionTo(MessageLoop::current());
-
-  CompositorLRU::Init();
 }
 
 void
 CompositorBridgeParent::InitSameProcess(widget::CompositorWidget* aWidget,
                                         const uint64_t& aLayerTreeId,
                                         bool aUseAPZ)
 {
   mWidget = aWidget;
--- a/gfx/layers/ipc/CompositorLRU.cpp
+++ b/gfx/layers/ipc/CompositorLRU.cpp
@@ -4,20 +4,20 @@
 /* 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 "CompositorLRU.h"
 
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/DebugOnly.h"
+#include "mozilla/Preferences.h"
 #include "mozilla/unused.h"
 
 #include "CompositorBridgeParent.h"
-#include "gfxPrefs.h"
 
 namespace mozilla {
 namespace layers {
 
 mozilla::StaticRefPtr<CompositorLRU> CompositorLRU::sSingleton;
 
 void
 CompositorLRU::Init()
@@ -34,17 +34,17 @@ CompositorLRU::GetSingleton()
   sSingleton = new CompositorLRU();
   ClearOnShutdown(&sSingleton);
 
   return sSingleton;
 }
 
 CompositorLRU::CompositorLRU()
 {
-  mLRUSize = gfxPrefs::LayersCompositorLRUSize();
+  mLRUSize = Preferences::GetUint("layers.compositor-lru-size", uint32_t(0));
 }
 
 CompositorLRU::~CompositorLRU()
 {
 }
 
 void
 CompositorLRU::Add(PCompositorBridgeParent* aCompositor, const uint64_t& aId)
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -412,17 +412,16 @@ private:
   DECL_GFX_PREF(Once, "image.mem.surfacecache.max_size_kb",    ImageMemSurfaceCacheMaxSizeKB, uint32_t, 100 * 1024);
   DECL_GFX_PREF(Once, "image.mem.surfacecache.min_expiration_ms", ImageMemSurfaceCacheMinExpirationMS, uint32_t, 60*1000);
   DECL_GFX_PREF(Once, "image.mem.surfacecache.size_factor",    ImageMemSurfaceCacheSizeFactor, uint32_t, 64);
   DECL_GFX_PREF(Live, "image.mozsamplesize.enabled",           ImageMozSampleSizeEnabled, bool, false);
   DECL_GFX_PREF(Once, "image.multithreaded_decoding.limit",    ImageMTDecodingLimit, int32_t, -1);
   DECL_GFX_PREF(Live, "image.single-color-optimization.enabled", ImageSingleColorOptimizationEnabled, bool, true);
 
   DECL_GFX_PREF(Live, "layers.child-process-shutdown",         ChildProcessShutdown, bool, true);
-  DECL_GFX_PREF(Live, "layers.compositor-lru-size",            LayersCompositorLRUSize, uint32_t, 0);
   DECL_GFX_PREF(Once, "layers.acceleration.disabled",          LayersAccelerationDisabledDoNotUseDirectly, bool, false);
   DECL_GFX_PREF(Live, "layers.acceleration.draw-fps",          LayersDrawFPS, bool, false);
   DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.print-histogram",  FPSPrintHistogram, bool, false);
   DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, bool, false);
   DECL_GFX_PREF(Once, "layers.acceleration.force-enabled",     LayersAccelerationForceEnabledDoNotUseDirectly, bool, false);
   DECL_GFX_PREF(Once, "layers.allow-d3d9-fallback",            LayersAllowD3D9Fallback, bool, false);
   DECL_GFX_PREF(Once, "layers.amd-switchable-gfx.enabled",     LayersAMDSwitchableGfxEnabled, bool, false);
   DECL_GFX_PREF(Once, "layers.async-pan-zoom.enabled",         AsyncPanZoomEnabledDoNotUseDirectly, bool, true);
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -305,16 +305,18 @@ nsLayoutStatics::Initialize()
   nsStyleContext::Initialize();
   mozilla::LayerAnimationInfo::Initialize();
 #endif
 
   MediaDecoder::InitStatics();
 
   PromiseDebugging::Init();
 
+  layers::CompositorLRU::Init();
+
   mozilla::dom::devicestorage::DeviceStorageStatics::Initialize();
 
   mozilla::dom::WebCryptoThreadPool::Initialize();
 
 #ifdef MOZ_STYLO
   Servo_Initialize();
 #endif