aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings-popup-preview.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2019-11-05 19:04:13 -0800
committerAlex Yatskov <alex@foosoft.net>2019-11-05 19:04:13 -0800
commit08ad2779678cd447bd747c2b155ef9b5135fdf5d (patch)
treefaa54cbf9176989f9bd3c3b90ff3e032189adb20 /ext/bg/js/settings-popup-preview.js
parent438498435227cfa59cf9ed3430045b288cd2a7c0 (diff)
parent91c01e0a7eeeb851344a22ace8a5fa0b873a3e57 (diff)
Merge branch 'master' into testing
Diffstat (limited to 'ext/bg/js/settings-popup-preview.js')
-rw-r--r--ext/bg/js/settings-popup-preview.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/bg/js/settings-popup-preview.js b/ext/bg/js/settings-popup-preview.js
index b12fb726..7d641c46 100644
--- a/ext/bg/js/settings-popup-preview.js
+++ b/ext/bg/js/settings-popup-preview.js
@@ -159,8 +159,11 @@ class SettingsPopupPreview {
range.selectNode(textNode);
const source = new TextSourceRange(range, range.toString(), null);
- this.frontend.textSourceLast = null;
- await this.frontend.searchSource(source, 'script');
+ try {
+ await this.frontend.searchSource(source, 'script');
+ } finally {
+ source.cleanup();
+ }
await this.frontend.lastShowPromise;
if (this.frontend.popup.isVisible()) {