Bug 642205 Followup: workaround for Android compiler bug r=tnikkel a=blocking-fennec CLOSED TREE
authorBenjamin Stover <bstover@mozilla.com>
Thu, 17 Mar 2011 15:48:47 -0700
changeset 63442 9c3ef79b8ebafad754f5e5593a8112b23e061468
parent 63441 61bb16eb15db760ff50147e0ab7c1f4f88446afc
child 63443 4da037fe27b011014244ba56e04e38e74ca66fbc
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewerstnikkel, blocking-fennec
bugs642205
milestone2.0b13pre
Bug 642205 Followup: workaround for Android compiler bug r=tnikkel a=blocking-fennec CLOSED TREE
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2033,16 +2033,21 @@ nsGfxScrollFrameInner::GetScrollbarStyle
 
     nsCOMPtr<nsISupports> container = presContext->GetContainer();
     nsCOMPtr<nsIScrollable> scrollable = do_QueryInterface(container);
     if (scrollable) {
       HandleScrollPref(scrollable, nsIScrollable::ScrollOrientation_X,
                        result.mHorizontal);
       HandleScrollPref(scrollable, nsIScrollable::ScrollOrientation_Y,
                        result.mVertical);
+      // XXX EVIL COMPILER BUG BE CAREFUL WHEN CHANGING
+      //     There is a bug in the Android compiler :(
+      //     It seems that the compiler optimizes something out and uses
+      //     a bad value for result if we don't directly return here.
+      return result;
     }
   } else {
     const nsStyleDisplay *disp = mOuter->GetStyleDisplay();
     result.mHorizontal = disp->mOverflowX;
     result.mVertical = disp->mOverflowY;
   }
 
   return result;