Auto merge of #27506 - paulrouget:morePrefMemIssues, r=jdm
Auto merge of #27506 - paulrouget:morePrefMemIssues, r=jdm

Keep C++ pref value in memory longer

KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo