Bug 791731: Don't immediately discard image data in UnbindFromTree, instead rely on the discard timer. r=jlebar
authorKyle Huey <khuey@kylehuey.com>
Tue, 02 Oct 2012 18:52:03 -0700
changeset 115282 1797401e19ce70a303983563e66f6501acb4c1eb
parent 115281 e444e0facfb56663bff8adcfcb659daa9c3248c1
child 115283 6e04928c99aace512db1d28fa5ffb10a08cb527c
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs791731
milestone18.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 791731: Don't immediately discard image data in UnbindFromTree, instead rely on the discard timer. r=jlebar
content/base/src/nsImageLoadingContent.cpp
--- a/content/base/src/nsImageLoadingContent.cpp
+++ b/content/base/src/nsImageLoadingContent.cpp
@@ -1178,19 +1178,19 @@ nsImageLoadingContent::UnbindFromTree(bo
     return;
 
   // Push a null JSContext on the stack so that callbacks triggered by the
   // below code won't think they're being called from JS.
   nsCxPusher pusher;
   pusher.PushNull();
 
   if (mCurrentRequestFlags & REQUEST_SHOULD_BE_TRACKED)
-    doc->RemoveImage(mCurrentRequest, nsIDocument::REQUEST_DISCARD);
+    doc->RemoveImage(mCurrentRequest);
   if (mPendingRequestFlags & REQUEST_SHOULD_BE_TRACKED)
-    doc->RemoveImage(mPendingRequest, nsIDocument::REQUEST_DISCARD);
+    doc->RemoveImage(mPendingRequest);
 }
 
 nsresult
 nsImageLoadingContent::TrackImage(imgIRequest* aImage)
 {
   if (!aImage)
     return NS_OK;