mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
On failure, save a dummy file from the background page thumb capture module.
If a background page thumbnail capture fails (e.g. due to too heavy scripting), we should write -something- to the thumbnail cache, because otherwise it will try again and again, which is problematic for bad trap pages, that even if the user has left the page never to return again, the thumbnail service may still try to capture, and fail. This resolves the only problem for us in #592.
This commit is contained in:
parent
1126ed480b
commit
952c11cef9
1 changed files with 6 additions and 1 deletions
|
|
@ -468,7 +468,12 @@ Capture.prototype = {
|
|||
};
|
||||
|
||||
if (!data) {
|
||||
done();
|
||||
// If this background attempt failed, cause a dummy file to be saved, so
|
||||
// that gets loaded instead of attempting again (and again).
|
||||
// XXX: Perhaps we can create a placeholder image to use instead of "null"
|
||||
// here, so it has something to show to the user?
|
||||
PageThumbs._store(this.url, this.url, null, true)
|
||||
.then(done, done);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue