Bug 1333324 - Check for a potentially null or undefined browser.currentURI in _capture since it runs off of a timeout and the browser may not have a webNavigation associated with it anymore. r?florian
MozReview-Commit-ID: 1FWGSl9yefO
--- a/browser/base/content/browser-thumbnails.js
+++ b/browser/base/content/browser-thumbnails.js
@@ -87,17 +87,18 @@ var gBrowserThumbnails = {
aRequest, aStateFlags, aStatus) {
if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK)
this._delayedCapture(aBrowser);
},
_capture: function Thumbnails_capture(aBrowser) {
// Only capture about:newtab top sites.
- if (this._topSiteURLs.indexOf(aBrowser.currentURI.spec) == -1)
+ if (!aBrowser.currentURI ||
+ this._topSiteURLs.indexOf(aBrowser.currentURI.spec) == -1)
return;
this._shouldCapture(aBrowser, function(aResult) {
if (aResult) {
PageThumbs.captureAndStoreIfStale(aBrowser);
}
});
},