From ee0659e682532e64efcf728ddf6193c46a8a95d7 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 30 Apr 2023 16:26:44 +0200 Subject: [PATCH] Remove unused `canvas` clean-up code in `PDFThumbnailView.reset` (PR 13357 follow-up) --- web/pdf_thumbnail_view.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/web/pdf_thumbnail_view.js b/web/pdf_thumbnail_view.js index a85e1b4c7841b6..451a227294ac9a 100644 --- a/web/pdf_thumbnail_view.js +++ b/web/pdf_thumbnail_view.js @@ -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;