Remove unused canvas clean-up code in PDFThumbnailView.reset (PR 13357 follow-up)

This commit is contained in:
Jonas Jenwald 2023-04-30 16:26:44 +02:00
parent 1b6a83da4a
commit 74c615b5b0

View File

@ -163,13 +163,6 @@ class PDFThumbnailView {
this.image?.replaceWith(this._placeholderImg); this.image?.replaceWith(this._placeholderImg);
this.#updateDims(); this.#updateDims();
if (this.canvas) {
// Zeroing the width and height causes Firefox to release graphics
// resources immediately, which can greatly reduce memory consumption.
this.canvas.width = 0;
this.canvas.height = 0;
delete this.canvas;
}
if (this.image) { if (this.image) {
this.image.removeAttribute("src"); this.image.removeAttribute("src");
delete this.image; delete this.image;