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 339413 c6efb920dd67e68956499bcb5d0e8127f9b1ca34
parent 339412 ce9080e6765eb54ba1d65df446e4d917edb18677
child 339414 824355c9efe23d83f7e67a4b2c9e0e837f7c7771
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [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.