From dcfb405994f70c015f13a9b6cfb728501d7c128d Mon Sep 17 00:00:00 2001 From: girst Date: Tue, 17 Nov 2020 16:38:24 +0100 Subject: [PATCH] Fix Extension Bootstrap for Firefox 84 Regresed by: Bug 1649843 --- extension/bootstrap-frame.js.tmpl | 1 + extension/bootstrap.coffee | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/extension/bootstrap-frame.js.tmpl b/extension/bootstrap-frame.js.tmpl index 8201ce0..543f267 100644 --- a/extension/bootstrap-frame.js.tmpl +++ b/extension/bootstrap-frame.js.tmpl @@ -1,3 +1,4 @@ +const { Services } = Cu.import('resource://gre/modules/Services.jsm'); Services.scriptloader.loadSubScript( Services.io.newURI('{{{ ADDON_PATH }}}/content/bootstrap.js', null, null).spec, this, diff --git a/extension/bootstrap.coffee b/extension/bootstrap.coffee index b3e6e14..8663324 100644 --- a/extension/bootstrap.coffee +++ b/extension/bootstrap.coffee @@ -16,11 +16,9 @@ do (global = this) -> BUILD_TIME = do -> # @echo BUILD_TIME REQUIRE_DATA = do -> # @echo REQUIRE_DATA - unless IS_FRAME_SCRIPT - # Make `Services` and `console` available globally, just like they are in - # frame scripts by default. - Cu.import('resource://gre/modules/Services.jsm') - Cu.import('resource://gre/modules/Console.jsm') + # Make `Services` and `console` available globally and in frame scripts. + Cu.import('resource://gre/modules/Services.jsm') + Cu.import('resource://gre/modules/Console.jsm') shutdownHandlers = [] -- 2.39.3