From 6d5b6d03595796fac6d0aec608e985aa620354ff Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:55:44 +0200 Subject: Adding debian version 115.8.0esr-1. Signed-off-by: Daniel Baumann --- ...reference-files-to-set-locked-prefs-with-.patch | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 debian/patches/debian-hacks/Allow-.js-preference-files-to-set-locked-prefs-with-.patch (limited to 'debian/patches/debian-hacks/Allow-.js-preference-files-to-set-locked-prefs-with-.patch') diff --git a/debian/patches/debian-hacks/Allow-.js-preference-files-to-set-locked-prefs-with-.patch b/debian/patches/debian-hacks/Allow-.js-preference-files-to-set-locked-prefs-with-.patch new file mode 100644 index 0000000000..39908b6e81 --- /dev/null +++ b/debian/patches/debian-hacks/Allow-.js-preference-files-to-set-locked-prefs-with-.patch @@ -0,0 +1,81 @@ +From: Mike Hommey +Date: Sat, 21 Jun 2008 02:48:46 +0200 +Subject: Allow .js preference files to set locked prefs with lockPref() + +Upstream now supports locked prefs, but with a different syntax from +the syntax we had supported for a while. +--- + modules/libpref/parser/src/lib.rs | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/modules/libpref/parser/src/lib.rs b/modules/libpref/parser/src/lib.rs +index 3a0ad2c..c6e34be 100644 +--- a/modules/libpref/parser/src/lib.rs ++++ b/modules/libpref/parser/src/lib.rs +@@ -11,8 +11,9 @@ + //! ```text + //! = * + //! = "(" "," ")" ";" +-//! = "user_pref" | "pref" | "sticky_pref" // in default pref files ++//! = "user_pref" | "pref" | "sticky_pref" | "lockPref" // in default pref files + //! = "user_pref" // in user pref files ++//! = "user_pref" | "pref" | "sticky_pref | lockPref" + //! = + //! = | "true" | "false" | + //! = ? +@@ -169,6 +170,7 @@ enum Token { + // Keywords + Pref, // pref + StickyPref, // sticky_pref ++ LockPref, // lockPref + UserPref, // user_pref + True, // true + False, // false +@@ -291,7 +293,7 @@ struct KeywordInfo { + token: Token, + } + +-const KEYWORD_INFOS: [KeywordInfo; 7] = [ ++const KEYWORD_INFOS: [KeywordInfo; 8] = [ + // These are ordered by frequency. + KeywordInfo { + string: b"pref", +@@ -321,6 +323,10 @@ const KEYWORD_INFOS: [KeywordInfo; 7] = [ + string: b"sticky_pref", + token: Token::StickyPref, + }, ++ KeywordInfo { ++ string: b"lockPref", ++ token: Token::LockPref, ++ }, + ]; + + struct Parser<'t> { +@@ -373,14 +379,15 @@ impl<'t> Parser<'t> { + // this will be either the first token of a new pref, or EOF. + loop { + // +- let (pref_value_kind, mut is_sticky) = match token { ++ let (pref_value_kind, mut is_sticky, mut is_locked) = match token { + Token::Pref if self.kind == PrefValueKind::Default => { +- (PrefValueKind::Default, false) ++ (PrefValueKind::Default, false, false) + } + Token::StickyPref if self.kind == PrefValueKind::Default => { +- (PrefValueKind::Default, true) ++ (PrefValueKind::Default, true, false) + } +- Token::UserPref => (PrefValueKind::User, false), ++ Token::LockPref => (PrefValueKind::Default, false, true), ++ Token::UserPref => (PrefValueKind::User, false, false), + Token::SingleChar(EOF) => return !self.has_errors, + _ => { + token = self.error_and_recover( +@@ -490,7 +497,6 @@ impl<'t> Parser<'t> { + }; + + // ("," )* // default pref files only +- let mut is_locked = false; + let mut has_attrs = false; + if self.kind == PrefValueKind::Default { + let ok = loop { -- cgit v1.2.3