Bug 1269877: Fix timing issue in options browser resizing code. r?aswan
MozReview-Commit-ID: 9aV8QH7w8R8
--- 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.