Remove unused canvas
clean-up code in PDFThumbnailView.reset
(PR 13357 follow-up)
This commit is contained in:
parent
1b6a83da4a
commit
74c615b5b0
@ -163,13 +163,6 @@ class PDFThumbnailView {
|
||||
this.image?.replaceWith(this._placeholderImg);
|
||||
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) {
|
||||
this.image.removeAttribute("src");
|
||||
delete this.image;
|
||||
|
Loading…
Reference in New Issue
Block a user