ported "Allow .js preference files to set locked prefs with lock_pref()" patch

This commit is contained in:
Roy Tam 2019-11-04 12:24:15 +08:00
commit 102302fa48
4 changed files with 17 additions and 5 deletions

View file

@ -989,7 +989,8 @@ void PREF_ReaderCallback(void *closure,
PrefValue value,
PrefType type,
bool isDefault,
bool isStickyDefault)
bool isStickyDefault,
bool isLocked)
{
uint32_t flags = 0;
@ -1002,4 +1003,6 @@ void PREF_ReaderCallback(void *closure,
flags |= kPrefForceSet;
}
pref_HashPref(pref, value, type, flags);
if (isLocked)
PREF_LockPref(pref, true);
}