Bug 750722 - Fix missing null check. r=mfinkle a=blassey
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 02 May 2012 10:51:09 -0400
changeset 95590 2cd2fbbd988e6a5f62f92b9c5b247e56eb57e0ed
parent 95589 ef9cb1276f4c8c2508fa2ab46638dc80d5317b44
child 95591 72d39007162f937e70e177d3fc43b9ef8c41ac8b
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)
reviewersmfinkle, blassey
bugs750722
milestone14.0a2
Bug 750722 - Fix missing null check. r=mfinkle a=blassey
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -2557,17 +2557,17 @@ var BrowserEventHandler = {
       // the user wanted, and neither can any non-root sub-frame, cancel the
       // override so that Java can handle panning the main document.
       let data = JSON.parse(aData);
       if (this._firstScrollEvent) {
         while (this._scrollableElement != null && !this._elementCanScroll(this._scrollableElement, data.x, data.y))
           this._scrollableElement = this._findScrollableElement(this._scrollableElement, false);
 
         let doc = BrowserApp.selectedBrowser.contentDocument;
-        if (this._scrollableElement == doc.body || this._scrollableElement == doc.documentElement) {
+        if (this._scrollableElement == null || this._scrollableElement == doc.body || this._scrollableElement == doc.documentElement) {
           sendMessageToJava({ gecko: { type: "Panning:CancelOverride" } });
           return;
         }
 
         this._firstScrollEvent = false;
       }
 
       // Scroll the scrollable element