]> git.gir.st - LegacyFox.git/log
LegacyFox.git
5 weeks agoprovide easy way to find modifications to BootstrapLoader master github/master v4.0
girst [Sat, 16 Mar 2024 15:33:18 +0000 (16:33 +0100)]
provide easy way to find modifications to BootstrapLoader

this also removes the reference to the long obsolete
https://hg.mozilla.org/mozilla-central/rev/061b97e02ede.

7 weeks agoport legacyfox to ecmascript modules
girst [Sun, 3 Mar 2024 11:59:18 +0000 (12:59 +0100)]
port legacyfox to ecmascript modules

mozilla calls this 'esm-ification'. the last relevant to us modules were
ported in mozilla124[1], so this is our new minimum version. the old
version will likely be compatible with firefox up to version 128esr[2].

static imports are not supported in autoconfig scripts. i tried to keep
the diff as small as possible w.r.t comm-central's final JSMs. because
of this, we don't lazy-load any modules any more, nor provide any lazy
getters, as they would need to be loaded into a `lazy` object instead
the global (`this`) namespace, causing more churn. other than that, the
largest change was removing the now-useless Services.jsm workaround as
well as removing globalGetters for objects already loaded automatically.

[1]: https://hg.mozilla.org/mozilla-central/rev/68ba071ff6fb9978937496f9adc48e378957f594
[2]: bugzil.la/1881890

8 weeks agofix setting softDisabled state v3.3
girst [Thu, 29 Feb 2024 17:52:05 +0000 (18:52 +0100)]
fix setting softDisabled state

not that it is too important. Blocklist.jsm does not export blocklist
state any more. XPIInstall.jsm does this, since way before mozilla61:

  const { nsIBlocklistService } = Ci;
  addon.softDisabled = addon.blocklistState == nsIBlocklistService.STATE_SOFTBLOCKED;

c.f. https://searchfox.org/mozilla-central/rev/b503616295d69fee56300e5e2093599e6fb4f0e2/toolkit/mozapps/extensions/internal/XPIInstall.jsm#531

2 months agofix legacyfox for older browsers
girst [Sun, 25 Feb 2024 17:03:27 +0000 (18:03 +0100)]
fix legacyfox for older browsers

Services is only available in this scope since Bug 1667455 (mozilla104)

2 months agokeep RDFDataSource.saveToFile around
girst [Fri, 16 Feb 2024 14:23:33 +0000 (15:23 +0100)]
keep RDFDataSource.saveToFile around

minimizes the diff we need to keep. note that as previously mentioned
this requires mozilla>=85, but shouldn't cause issues unless called.

This partially reverts commit 553416c2d6d3c760cf98bd2c4afbaf0442321951.

2 months agoremove OS.File references
girst [Thu, 1 Feb 2024 20:22:58 +0000 (21:22 +0100)]
remove OS.File references

osfile.jsm was removed by bugzil.la/1772262. This method is not used any
more, so we can just remove it. the modern alternative would be the
following, but that only works on mozilla>=85.
    return IOUtils.writeUTF8(file, this.serializeToString());

osfile.jsm was loaded lazily (and in our case therefore never), so we
didn't die immediately upon import, fortunately.

see also: https://hg.mozilla.org/mozilla-central/diff/a11c616997d802e44d1afc0215bfbffac865179e/toolkit/components/passwordmgr/test/LoginTestUtils.jsm

2 months agoremove use of deprecated components
girst [Thu, 1 Feb 2024 20:17:50 +0000 (21:17 +0100)]
remove use of deprecated components

console.createInstance() is available since firefox59 (Bug 1425574), so
no workaround needed. ChromeUtils.defineLazyGetter() however only is
since firefox112 (Bug 1805288) but the backwards-compatible code is tiny

see also:
  https://bugzilla.mozilla.org/show_bug.cgi?id=1875216
  https://bugzilla.mozilla.org/show_bug.cgi?id=1430810
  https://bugzilla.mozilla.org/show_bug.cgi?id=1828156
  https://groups.google.com/a/mozilla.org/g/dev-platform/c/BdyWnTjLSXg

9 months agoadd backwards compatible code for Services.jsm removal v3.2
girst [Fri, 14 Jul 2023 11:10:18 +0000 (13:10 +0200)]
add backwards compatible code for Services.jsm removal

makes LegacyFox compatible with Firefox 117.

regressed-by: https://bugzilla.mozilla.org/show_bug.cgi?id=1780695
see-also: https://hg.mozilla.org/mozilla-central/rev/911d540fce6f

9 months agoMake compatible with Firefox 116 v3.1
girst [Sat, 1 Jul 2023 10:08:57 +0000 (12:08 +0200)]
Make compatible with Firefox 116

regressed-by: https://bugzil.la/920187

18 months agoFix bug in BootstrapLoader
girst [Tue, 27 Sep 2022 12:18:52 +0000 (14:18 +0200)]
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

23 months agoDo not override AddonSettings.REQUIRE_SIGNING v3.0
girst [Fri, 29 Apr 2022 13:31:44 +0000 (15:31 +0200)]
Do not override AddonSettings.REQUIRE_SIGNING

This is not necessary, as it is only checked in
XPIDatabase.jsm::mustSign(), which we can override instead, and in
aboutaddonsCommon.js::isDisabledUnsigned(), which we cannot affect
anyways and only uses it to show a red warning bar for legacy addons.

This also removes the old AddonSettings.ALLOW_LEGACY_EXTENSIONS
override, which was only used in Extension.jsm::experimentsAllowed()
and XPIDatabase.jsm::isDisabledLegacy().

This is in preparation for the ESM-ification endeavours going on at
Mozilla, which will make importing a module's global object (as we did
with `let Xdb = Cu.import(...)`) impossible, but was needed to get a
reference to AddonSettings (instead of a copy). Step two will be
replacing Cu.import() with ChromeUtils.import(), which has stricter
semantics about exported objects (doesn't hurt us; see Bug 1766114).

2 years agoRevert "automatically disable signature requirement"
girst [Sun, 6 Mar 2022 01:28:53 +0000 (02:28 +0100)]
Revert "automatically disable signature requirement"

downgrading the warning color stopped working some time ago. for
completeness, as of nightly99 xpinstall.signatures.required is only
checked in these places, none of which affect us:
- nsContentSecurityUtils.cpp::DetectJsHacks()
  only for telemetry and relaxing some security measures we don't need
- BrowserGlue.jsm::_onWindowsRestored()
  gates call to _notifyUnsignedAddonsDisabled(), which isn't triggered
  by our stuff (signedState != SIGNEDSTATE_MISSING)
- AddonSettings.jsm::REQUIRE_SIGNING
  overridden by our config.js script, so doesn't matter
- XPIProvider.jsm::observe()
  calls XPIDatabase.updateAddonAppDisabledStates(), which calls
  this.updateAddonDisabledState(addon), which depends on
  this.isUsableAddon(aAddon), which returns true as long as we override
  this.isDisabledLegacy(aAddon)

This reverts commit 29dc0ab3a8f8bd6e781fb983cd076764480dce18.

2 years agoremove EXPERIMENTS_ENABLED override
girst [Sun, 20 Feb 2022 11:58:25 +0000 (12:58 +0100)]
remove EXPERIMENTS_ENABLED override

this was never required.

3 years agoRevert "Enable Webextension experiments"
girst [Fri, 20 Nov 2020 14:45:35 +0000 (15:45 +0100)]
Revert "Enable Webextension experiments"

This reverts commit 152b73585cf37a64b8022c8bd027587c9d9e511f.

3 years agoEnable Webextension experiments
girst [Fri, 20 Nov 2020 14:44:07 +0000 (15:44 +0100)]
Enable Webextension experiments

This is outside the scope of LegacyFox and will be reverted. Only barely
tested.

3 years agoautomatically disable signature requirement v2.3
girst [Thu, 1 Oct 2020 20:59:50 +0000 (22:59 +0200)]
automatically disable signature requirement

Having signatures enforced causes a big red error message to appear
below unsigned extensions, telling the user the extension has been
disabled. This is not true, though; the extensions are still enabled.
Setting xpinstall.signatures.required;false downgrades this error to a
(yellow) warning.

3 years agodon't prevent unsigned addon warning to not break some addons v2.2
girst [Thu, 24 Sep 2020 12:03:38 +0000 (14:03 +0200)]
don't prevent unsigned addon warning to not break some addons

This broke installing some, but not all, addons. The reason is that some
addons derive their addon-id from a certificate's CommonName in
XPIInstall.jsm::loadManifest(aPackage, aLocation, aOldAddon)

3 years agoreword installation instructions v2.1
girst [Sat, 22 Aug 2020 17:51:50 +0000 (19:51 +0200)]
reword installation instructions

3 years agorecreate all properties of AddonSettings automatically
girst [Sat, 22 Aug 2020 17:11:26 +0000 (19:11 +0200)]
recreate all properties of AddonSettings automatically

Looks like all the settings continued to work by accident.

Note: out of scope for LegacyFox, but sideloading from anywhere can be
re-enabled by setting `SCOPES_SIDELOAD: 31 // AddonManager.SCOPE_ALL`.

4 years agoFix addon installation for Firefox 74 v2.0
girst [Sat, 18 Jan 2020 18:35:02 +0000 (19:35 +0100)]
Fix addon installation for Firefox 74

regressed by: Bug 1524327

4 years agoprovide clean and uninstall targets, auto-find correct path
girst [Fri, 27 Dec 2019 06:21:49 +0000 (07:21 +0100)]
provide clean and uninstall targets, auto-find correct path

The wildcard will match both /usr/lib and /usr/lib64, so the Makefile
works on 99% of Linux distros. And yes, that's not what DESTDIR is for.

4 years agoswitch to resource:// protocol
girst [Tue, 9 Jul 2019 20:06:56 +0000 (22:06 +0200)]
switch to resource:// protocol

bring the patch closer to the then-upstream comm-central. might have the
negative side-effect of being detectable by websites according to:
  https://developer.mozilla.org/en-US/docs/Mozilla/Chrome_Registration

4 years agodon't overwrite chrome.manifest
girst [Tue, 9 Jul 2019 20:04:02 +0000 (22:04 +0200)]
don't overwrite chrome.manifest

this hopefully makes the monkey patch update persistent.

Note: instead of using FileUtils, this would be another method:
  const {Services} = Cu.import('resource://gre/modules/Services.jsm');
  let manifest = Services.dirsvc.get('GreD', Ci.nsIFile);
  manifest.append('legacy.manifest');

4 years agofix chrome.manifest loading for mozilla68
girst [Tue, 9 Jul 2019 19:03:40 +0000 (21:03 +0200)]
fix chrome.manifest loading for mozilla68

the chrome.manifest inside the install directory is not loaded any
longer by default; see bugzil.la/1543761

4 years agoremove superfluous comments
girst [Mon, 24 Jun 2019 14:50:00 +0000 (16:50 +0200)]
remove superfluous comments

4 years agoadd link to bug report to keep an eye on
girst [Mon, 24 Jun 2019 14:49:02 +0000 (16:49 +0200)]
add link to bug report to keep an eye on

4 years agocredit where credit's due
girst [Mon, 24 Jun 2019 14:14:19 +0000 (16:14 +0200)]
credit where credit's due

4 years agoremove boot.jsm
girst [Mon, 24 Jun 2019 14:06:59 +0000 (16:06 +0200)]
remove boot.jsm

4 years agomore portabe makefile
girst [Mon, 24 Jun 2019 14:06:23 +0000 (16:06 +0200)]
more portabe makefile

still has the mozillapath hardcoded, though

4 years agoinitial commit v1.0
girst [Mon, 24 Jun 2019 05:36:36 +0000 (07:36 +0200)]
initial commit

Imprint / Impressum