Files
IronFox/patches/gecko-support-native-manifests.patch
celenity 6474a2c071 fix: Add additional checks for support of native manifests
This ensures that we only support native manifests of the "storage" type for uBo - anything else now gets thrown immediately - should help improve privacy/security, efficiency/performance (by avoiding unnecessary logic), and compatibility

Signed-off-by: celenity <celenity@celenity.dev>
2026-05-04 22:34:25 +00:00

26 lines
1.3 KiB
Diff

diff --git a/toolkit/components/extensions/NativeManifests.sys.mjs b/toolkit/components/extensions/NativeManifests.sys.mjs
index 5c9cee1b700d3..04d1eaa59d8f3 100644
--- a/toolkit/components/extensions/NativeManifests.sys.mjs
+++ b/toolkit/components/extensions/NativeManifests.sys.mjs
@@ -35,7 +35,7 @@ export var NativeManifests = {
let platform = AppConstants.platform;
if (platform == "win") {
this._lookup = this._winLookup;
- } else if (platform == "macosx" || platform == "linux") {
+ } else if (platform == "macosx" || platform == "linux" || platform == "android") {
let dirs = [
Services.dirsvc.get("XREUserNativeManifests", Ci.nsIFile).path,
Services.dirsvc.get("XRESysNativeManifests", Ci.nsIFile).path,
@@ -182,6 +182,11 @@ export var NativeManifests = {
},
async _tryPaths(type, name, dirs, context) {
+ if (AppConstants.platform == "android" && type !== "storage" && name !== "uBlock0@raymondhill.net") {
+ throw new Error(
+ `Native manifests are not supported on ${AppConstants.platform}`
+ );
+ }
for (let dir of dirs) {
let path = PathUtils.join(dir, TYPES[type], `${name}.json`);
let manifest = await this._tryPath(type, path, name, context, false);