From c2ebaa3a942180370e9318661ceacf4bae55560c Mon Sep 17 00:00:00 2001 From: girst Date: Tue, 27 Sep 2022 14:18:52 +0200 Subject: Fix bug in BootstrapLoader reported to https://github.com/xiaoxiaoflood/firefox-scripts/issues/115 > I just found that for my legacy addon after restart it some of it > function calls that initiated by timer or observer callback are > running in a sandbox context of the last startup which is different > from current one. And this cause malfunctions for my addon. see also: https://github.com/xiaoxiaoflood/firefox-scripts/commit/291bebc4f2edc919dd273f2cecbbfda61e157695 --- legacy/BootstrapLoader.jsm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/BootstrapLoader.jsm b/legacy/BootstrapLoader.jsm index d2a4598..cd7b64c 100644 --- a/legacy/BootstrapLoader.jsm +++ b/legacy/BootstrapLoader.jsm @@ -318,8 +318,8 @@ var BootstrapLoader = { } function findMethod(name) { - if (sandbox.name) { - return sandbox.name; + if (sandbox[name]) { + return sandbox[name]; } try { -- cgit v1.2.3