mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1231518. Load about:blank if thumbnail service fails. r=adw
This commit is contained in:
parent
c9b006d167
commit
6bad741446
@ -187,6 +187,7 @@ this.PageThumbUtils = {
|
||||
// remove the scrollbar sizes.
|
||||
let scale = Math.min(Math.max(intermediateWidth / contentWidth,
|
||||
intermediateHeight / contentHeight), 1);
|
||||
|
||||
let snapshotCtx = snapshotCanvas.getContext("2d");
|
||||
snapshotCtx.save();
|
||||
snapshotCtx.scale(scale, scale);
|
||||
|
@ -99,7 +99,7 @@ const backgroundPageThumbsContent = {
|
||||
onStateChange: function (webProgress, req, flags, status) {
|
||||
if (webProgress.isTopLevel &&
|
||||
(flags & Ci.nsIWebProgressListener.STATE_STOP) &&
|
||||
this._currentCapture && Components.isSuccessCode(status)) {
|
||||
this._currentCapture) {
|
||||
if (req.name == "about:blank") {
|
||||
if (this._state == STATE_CAPTURING) {
|
||||
// about:blank has loaded, ending the current capture.
|
||||
@ -114,10 +114,14 @@ const backgroundPageThumbsContent = {
|
||||
this._startNextCapture();
|
||||
}
|
||||
}
|
||||
else if (this._state == STATE_LOADING) {
|
||||
else if (this._state == STATE_LOADING &&
|
||||
Components.isSuccessCode(status)) {
|
||||
// The requested page has loaded. Capture it.
|
||||
this._state = STATE_CAPTURING;
|
||||
this._captureCurrentPage();
|
||||
} else {
|
||||
this._state = STATE_CANCELED;
|
||||
this._loadAboutBlank();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user