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

--HG--
extra : rebase_source : 26dfcd85a09d1de614c2fa97ed1b24b609981af8
This commit is contained in:
Jared Wein 2017-02-13 18:06:33 -05:00
parent 90506fcef4
commit 2f91e94e57

View File

@ -92,7 +92,8 @@ var gBrowserThumbnails = {
_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) {