bug 711757 - Fatal Exception: GeckoLooper Thread @ java.lang.IllegalArgumentException: width and height must be > 0 r=dougt
authorBrad Lassey <blassey@mozilla.com>
Tue, 20 Dec 2011 00:29:04 -0500
changeset 83152 5367244f4d73e707dfe1de940ef3552fae6aea4b
parent 83151 9d3e6a6901f7e93eadc4e7c9ac0fe7663fb03424
child 83153 7f9d4bc442c6e9c96d7b7ad84e34bb32a3b036ce
push id4273
push userblassey@mozilla.com
push dateWed, 21 Dec 2011 03:25:16 +0000
treeherdermozilla-inbound@5367244f4d73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs711757
milestone11.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 711757 - Fatal Exception: GeckoLooper Thread @ java.lang.IllegalArgumentException: width and height must be > 0 r=dougt
mobile/android/base/gfx/GeckoSoftwareLayerClient.java
--- a/mobile/android/base/gfx/GeckoSoftwareLayerClient.java
+++ b/mobile/android/base/gfx/GeckoSoftwareLayerClient.java
@@ -197,16 +197,18 @@ public class GeckoSoftwareLayerClient ex
     public ViewportMetrics getGeckoViewportMetrics() {
         // Return a copy, as we modify this inside the Gecko thread
         if (mGeckoViewport != null)
             return new ViewportMetrics(mGeckoViewport);
         return null;
     }
 
     public Bitmap getBitmap() {
+        if (mBufferSize.width <= 0 || mBufferSize.height <= 0)
+            return null;
         try {
             Bitmap b = Bitmap.createBitmap(mBufferSize.width, mBufferSize.height,
                                            CairoUtils.cairoFormatTobitmapConfig(mFormat));
             b.copyPixelsFromBuffer(mBuffer.asIntBuffer());
             return b;
         } catch (OutOfMemoryError oom) {
             Log.w(LOGTAG, "Unable to create bitmap", oom);
             return null;