Bug 1269877: Fix timing issue in options browser resizing code. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Thu, 02 Jun 2016 19:06:42 -0700
changeset 341426 c6efb920dd67e68956499bcb5d0e8127f9b1ca34
parent 341425 ce9080e6765eb54ba1d65df446e4d917edb18677
child 341427 824355c9efe23d83f7e67a4b2c9e0e837f7c7771
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1269877
milestone49.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 1269877: Fix timing issue in options browser resizing code. r=aswan MozReview-Commit-ID: 9aV8QH7w8R8
toolkit/mozapps/extensions/content/extensions.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -3467,16 +3467,20 @@ var gDetailView = {
         timeout = setTimeout(_resizeBrowser, TIMEOUT);
       }
     }
 
     function _resizeBrowser() {
       timeout = null;
 
       let doc = browser.contentDocument;
+      if (!doc) {
+        return;
+      }
+
       let body = doc.body || doc.documentElement;
 
       let docHeight = doc.documentElement.getBoundingClientRect().height;
 
       let height = Math.ceil(body.scrollHeight +
                              // Compensate for any offsets between the scroll
                              // area of the body and the outer height of the
                              // document.