Bug 1462272: Remove a weirdly named variable. r?dholbert draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 16 May 2018 20:02:21 +0200
changeset 796230 6e173ec34f57b42218b8ad8819ea67e80f6b9ff7
parent 796215 3a91e814b3f0555557c2d93d949ab150c41ba021
child 796231 160c2379a949df2f49eda5c97192309f2feda775
push id110185
push userbmo:emilio@crisal.io
push dateThu, 17 May 2018 09:02:34 +0000
reviewersdholbert
bugs1462272
milestone62.0a1
Bug 1462272: Remove a weirdly named variable. r?dholbert MozReview-Commit-ID: Anxe8c5OfLe
layout/generic/nsImageFrame.cpp
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -258,28 +258,26 @@ void
 nsImageFrame::Init(nsIContent*       aContent,
                    nsContainerFrame* aParent,
                    nsIFrame*         aPrevInFlow)
 {
   nsAtomicContainerFrame::Init(aContent, aParent, aPrevInFlow);
 
   mListener = new nsImageListener(this);
 
+  if (!gIconLoad)
+    LoadIcons(PresContext());
+
   nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(aContent);
   if (!imageLoader) {
     MOZ_CRASH("Why do we have an nsImageFrame here at all?");
   }
 
   imageLoader->AddNativeObserver(mListener);
 
-  nsPresContext *aPresContext = PresContext();
-
-  if (!gIconLoad)
-    LoadIcons(aPresContext);
-
   // We have a PresContext now, so we need to notify the image content node
   // that it can register images.
   imageLoader->FrameCreated(this);
 
   // Give image loads associated with an image frame a small priority boost!
   nsCOMPtr<imgIRequest> currentRequest;
   imageLoader->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
                           getter_AddRefs(currentRequest));