Bug 661101 backout a part of 9014863a7e2a which was included to the mq file unexpectedly
authorMasayuki Nakano <masayuki@d-toybox.com>
Tue, 07 Jun 2011 16:44:56 +0900
changeset 70675 66cbdac564691a2b69c6a6470f4866d4ce9645c6
parent 70674 9014863a7e2a93d4a45c8ff09e73bfdff58ba292
child 70682 a4460d173d9af75c52ff2c75f55601bdb5ce9c3b
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs661101
milestone7.0a1
Bug 661101 backout a part of 9014863a7e2a which was included to the mq file unexpectedly
layout/generic/nsImageFrame.cpp
layout/generic/nsImageFrame.h
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1882,29 +1882,24 @@ NS_IMPL_ISUPPORTS2(nsImageFrame::IconLoa
 static const char* kIconLoadPrefs[] = {
   "browser.display.force_inline_alttext",
   "browser.display.show_image_placeholders",
   nsnull
 };
 
 nsImageFrame::IconLoad::IconLoad()
 {
-  mHasShutdown = PR_FALSE;
   // register observers
   Preferences::AddStrongObservers(this, kIconLoadPrefs);
   GetPrefs();
 }
 
 void
 nsImageFrame::IconLoad::Shutdown()
 {
-  if (mHasShutdown) {
-    return;
-  }
-  mHasShutdown = PR_TRUE;
   Preferences::RemoveObservers(this, kIconLoadPrefs);
   // in case the pref service releases us later
   if (mLoadingImage) {
     mLoadingImage->CancelAndForgetObserver(NS_ERROR_FAILURE);
     mLoadingImage = nsnull;
   }
   if (mBrokenImage) {
     mBrokenImage->CancelAndForgetObserver(NS_ERROR_FAILURE);
--- a/layout/generic/nsImageFrame.h
+++ b/layout/generic/nsImageFrame.h
@@ -322,20 +322,16 @@ private:
                     imgIRequest **aRequest);
 
   class IconLoad : public nsIObserver,
                    public imgIDecoderObserver {
     // private class that wraps the data and logic needed for
     // broken image and loading image icons
   public:
     IconLoad();
-    ~IconLoad()
-    {
-      Shutdown();
-    }
 
     void Shutdown();
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIOBSERVER
     NS_DECL_IMGICONTAINEROBSERVER
     NS_DECL_IMGIDECODEROBSERVER
 
@@ -358,17 +354,16 @@ private:
     nsTObserverArray<nsImageFrame*> mIconObservers;
 
 
   public:
     nsCOMPtr<imgIRequest> mLoadingImage;
     nsCOMPtr<imgIRequest> mBrokenImage;
     PRPackedBool     mPrefForceInlineAltText;
     PRPackedBool     mPrefShowPlaceholders;
-    PRPackedBool     mHasShutdown;
   };
   
 public:
   static IconLoad* gIconLoad; // singleton pattern: one LoadIcons instance is used
   
   friend class nsDisplayImage;
 };