From 4bcb79066b465e132f9e9a1b3ad97036a0083689 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 23 May 2021 14:57:13 +0000 Subject: [PATCH] [Pale-Moon] Issue #1870 - Add try/catch and console logging for failing autocomplete popup. --- application/palemoon/modules/AutoCompletePopup.jsm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/application/palemoon/modules/AutoCompletePopup.jsm b/application/palemoon/modules/AutoCompletePopup.jsm index 2fe5e70bb5..3d37ceba47 100644 --- a/application/palemoon/modules/AutoCompletePopup.jsm +++ b/application/palemoon/modules/AutoCompletePopup.jsm @@ -188,10 +188,15 @@ this.AutoCompletePopup = { closePopup() { if (this.openedPopup) { - // Note that hidePopup() closes the popup immediately, - // so popuphiding or popuphidden events will be fired - // and handled during this call. - this.openedPopup.hidePopup(); + try { + // Note that hidePopup() closes the popup immediately, + // so popuphiding or popuphidden events will be fired + // and handled during this call. + this.openedPopup.hidePopup(); + } catch(e) { + Cu.reportError(e); + console.log("Debug: ", this.openedPopup); + } } AutoCompleteTreeView.clearResults(); },