Bug 918220. Part 1. Rename the pref content.image.allow_locking to make it clear that it only applies to content processes. r=jmuizelaar
authorTimothy Nikkel <tnikkel@gmail.com>
Mon, 30 Sep 2013 12:53:46 -0500
changeset 149359 d5f8eca5f00e85e16414b9a077c53bd857d0c1d6
parent 149358 0ede95a5c915ec7d07e8d8a4d2fbed8d776c2cf6
child 149360 6f7129d1e041292318b5123ff6acf151a5b80ce5
push id25386
push useremorley@mozilla.com
push dateTue, 01 Oct 2013 09:29:22 +0000
treeherdermozilla-central@6856c45f3688 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar
bugs918220
milestone27.0a1
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
Bug 918220. Part 1. Rename the pref content.image.allow_locking to make it clear that it only applies to content processes. r=jmuizelaar
b2g/app/b2g.js
content/base/src/nsDocument.cpp
image/src/RasterImage.cpp
mobile/android/app/mobile.js
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -279,17 +279,17 @@ pref("media.preload.auto", 2);    // pre
 pref("media.cache_size", 4096);    // 4MB media cache
 
 // The default number of decoded video frames that are enqueued in
 // MediaDecoderReader's mVideoQueue.
 pref("media.video-queue.default-size", 3);
 
 // optimize images' memory usage
 pref("image.mem.decodeondraw", true);
-pref("content.image.allow_locking", false); /* don't allow image locking */
+pref("image.mem.allow_locking_in_content_processes", false); /* don't allow image locking */
 pref("image.mem.min_discard_timeout_ms", 86400000); /* 24h, we rely on the out of memory hook */
 pref("image.mem.max_decoded_image_kb", 30000); /* 30MB seems reasonable */
 pref("image.onload.decode.limit", 24); /* don't decode more than 24 images eagerly */
 
 // XXX this isn't a good check for "are touch events supported", but
 // we don't really have a better one at the moment.
 #ifdef MOZ_WIDGET_GONK
 // enable touch events interfaces
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -9162,17 +9162,17 @@ PLDHashOperator UnlockEnumerator(imgIReq
   return PL_DHASH_NEXT;
 }
 
 
 nsresult
 nsDocument::SetImageLockingState(bool aLocked)
 {
   if (XRE_GetProcessType() == GeckoProcessType_Content &&
-      !Preferences::GetBool("content.image.allow_locking", true)) {
+      !Preferences::GetBool("image.mem.allow_locking_in_content_processes", true)) {
     return NS_OK;
   }
 
   // If there's no change, there's nothing to do.
   if (mLockingImages == aLocked)
     return NS_OK;
 
   // Otherwise, iterate over our images and perform the appropriate action.
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -2626,17 +2626,17 @@ RasterImage::Draw(gfxContext *aContext,
     mFrameDecodeFlags = DECODE_FLAGS_DEFAULT;
   }
 
   // If this image is a candidate for discarding, reset its position in the
   // discard tracker so we're less likely to discard it right away.
   //
   // (We don't normally draw unlocked images, so this conditition will usually
   // be false.  But we will draw unlocked images if image locking is globally
-  // disabled via the content.image.allow_locking pref.)
+  // disabled via the image.mem.allow_locking_in_content_processes pref.)
   if (DiscardingActive()) {
     DiscardTracker::Reset(&mDiscardTrackerNode);
   }
 
 
   if (IsUnlocked() && mStatusTracker) {
     mStatusTracker->OnUnlockedDraw();
   }
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -562,17 +562,17 @@ pref("browser.chrome.toolbar_tips", fals
 pref("dom.indexedDB.warningQuota", 5);
 
 // prevent video elements from preloading too much data
 pref("media.preload.default", 1); // default to preload none
 pref("media.preload.auto", 2);    // preload metadata if preload=auto
 
 // optimize images memory usage
 pref("image.mem.decodeondraw", true);
-pref("content.image.allow_locking", false);
+pref("image.mem.allow_locking_in_content_processes", false);
 pref("image.mem.min_discard_timeout_ms", 10000);
 
 // enable touch events interfaces
 pref("dom.w3c_touch_events.enabled", 1);
 
 #ifdef MOZ_SAFE_BROWSING
 pref("browser.safebrowsing.enabled", true);
 pref("browser.safebrowsing.malware.enabled", true);