From 4c0556f9283c8c5c6ac8db9d454e2116d571e997 Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 20 Apr 2018 21:11:18 +0300 Subject: [PMkit] Remove embedded WebExtensions support --- toolkit/jetpack/moz.build | 12 ++++++++---- toolkit/jetpack/sdk/addon/bootstrap.js | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'toolkit/jetpack') diff --git a/toolkit/jetpack/moz.build b/toolkit/jetpack/moz.build index ad11e90a3..1e1b48f3d 100644 --- a/toolkit/jetpack/moz.build +++ b/toolkit/jetpack/moz.build @@ -128,9 +128,10 @@ EXTRA_JS_MODULES.commonjs += [ 'test.js', ] -EXTRA_JS_MODULES.commonjs.sdk += [ - 'sdk/webextension.js', -] +if not CONFIG['MC_PALEMOON']: + EXTRA_JS_MODULES.commonjs.sdk += [ + 'sdk/webextension.js', + ] EXTRA_JS_MODULES.commonjs.dev += [ 'dev/debuggee.js', @@ -228,7 +229,6 @@ EXTRA_PP_JS_MODULES.commonjs.sdk += [ ] EXTRA_JS_MODULES.commonjs.sdk.addon += [ - 'sdk/addon/bootstrap.js', 'sdk/addon/events.js', 'sdk/addon/host.js', 'sdk/addon/installer.js', @@ -237,6 +237,10 @@ EXTRA_JS_MODULES.commonjs.sdk.addon += [ 'sdk/addon/window.js', ] +EXTRA_PP_JS_MODULES.commonjs.sdk.addon += [ + 'sdk/addon/bootstrap.js', +] + EXTRA_JS_MODULES.commonjs.sdk.browser += [ 'sdk/browser/events.js', ] diff --git a/toolkit/jetpack/sdk/addon/bootstrap.js b/toolkit/jetpack/sdk/addon/bootstrap.js index 0397d91e5..9eb5efac7 100644 --- a/toolkit/jetpack/sdk/addon/bootstrap.js +++ b/toolkit/jetpack/sdk/addon/bootstrap.js @@ -134,8 +134,10 @@ Bootstrap.prototype = { const main = command === "test" ? "sdk/test/runner" : null; const prefsURI = `${baseURI}defaults/preferences/prefs.js`; +#ifndef MC_PALEMOON // Init the 'sdk/webextension' module from the bootstrap addon parameter. require("sdk/webextension").initFromBootstrapAddonParam(addon); +#endif const { startup } = require("sdk/addon/runner"); startup(reason, {loader, main, prefsURI}); -- cgit v1.2.3 From e00e3008fe1775d17c4c9bba7a382a159ba5ef9e Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 20 Apr 2018 22:45:23 +0300 Subject: [PMkit] Rely on MOZ_WEBEXTENSIONS to include 'sdk/webextension' --- toolkit/jetpack/moz.build | 2 +- toolkit/jetpack/sdk/addon/bootstrap.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'toolkit/jetpack') diff --git a/toolkit/jetpack/moz.build b/toolkit/jetpack/moz.build index 1e1b48f3d..2e5dbe5e8 100644 --- a/toolkit/jetpack/moz.build +++ b/toolkit/jetpack/moz.build @@ -128,7 +128,7 @@ EXTRA_JS_MODULES.commonjs += [ 'test.js', ] -if not CONFIG['MC_PALEMOON']: +if CONFIG['MOZ_WEBEXTENSIONS']: EXTRA_JS_MODULES.commonjs.sdk += [ 'sdk/webextension.js', ] diff --git a/toolkit/jetpack/sdk/addon/bootstrap.js b/toolkit/jetpack/sdk/addon/bootstrap.js index 9eb5efac7..6c5827f1e 100644 --- a/toolkit/jetpack/sdk/addon/bootstrap.js +++ b/toolkit/jetpack/sdk/addon/bootstrap.js @@ -134,7 +134,7 @@ Bootstrap.prototype = { const main = command === "test" ? "sdk/test/runner" : null; const prefsURI = `${baseURI}defaults/preferences/prefs.js`; -#ifndef MC_PALEMOON +#ifdef MOZ_WEBEXTENSIONS // Init the 'sdk/webextension' module from the bootstrap addon parameter. require("sdk/webextension").initFromBootstrapAddonParam(addon); #endif -- cgit v1.2.3