Bug 742743. Remove needless try/catch block. r=kats
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 05 Apr 2012 11:42:49 -0400
changeset 95075 2b06484c231c230f6f57441ba730945ac9858f19
parent 95074 07257e5f06d5eaf8cfb181fb031253fade92bbbe
child 95076 b295582d2c6a17bf64f999617d128dc9f70f64d7
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs742743
milestone14.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 742743. Remove needless try/catch block. r=kats This was needed before, but I've since removed the code that would throw.
mobile/android/base/gfx/ScrollbarLayer.java
--- a/mobile/android/base/gfx/ScrollbarLayer.java
+++ b/mobile/android/base/gfx/ScrollbarLayer.java
@@ -228,39 +228,33 @@ public class ScrollbarLayer extends Tile
      * Return true if the opacity was decreased, or false if the scrollbars
      * are already fully faded out.
      */
     public boolean fade() {
         if (FloatUtils.fuzzyEquals(mOpacity, 0.0f)) {
             return false;
         }
         beginTransaction(); // called on compositor thread
-        try {
-            mOpacity = Math.max(mOpacity - FADE_AMOUNT, 0.0f);
-        } finally {
-            endTransaction();
-        }
+        mOpacity = Math.max(mOpacity - FADE_AMOUNT, 0.0f);
+        endTransaction();
         return true;
     }
 
     /**
      * Restore the opacity of the scrollbar to fully opaque.
      * Return true if the opacity was changed, or false if the scrollbars
      * are already fully opaque.
      */
     public boolean unfade() {
         if (FloatUtils.fuzzyEquals(mOpacity, 1.0f)) {
             return false;
         }
         beginTransaction(); // called on compositor thread
-        try {
-            mOpacity = 1.0f;
-        } finally {
-            endTransaction();
-        }
+        mOpacity = 1.0f;
+        endTransaction();
         return true;
     }
 
     @Override
     public void draw(RenderContext context) {
         if (!initialized())
             return;