libservo: update stylo preferences in multiprocess mode. (#34661)

When servo is run in multiprocess mode, the content process receives
the preferences via IPC from the main process. However, currently
these preferences are only used to update  Servo's own preferences by
explictly calling Preference::set_all(). This doesn't ensure that
stylo's copy of preferences is also updated.

This change replaces the call to `Preference::set_all()` with
call to `add_user_prefs` which does ensure both Servo's and Stylos'
preferences are updated.

Fixes #34660.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-12-17 14:32:50 +05:30 committed by GitHub
parent 6cddb88f64
commit 1e17dfdf31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1209,9 +1209,7 @@ pub fn run_content_process(token: String) {
let unprivileged_content = unprivileged_content_receiver.recv().unwrap();
opts::set_options(unprivileged_content.opts());
prefs::pref_map()
.set_all(unprivileged_content.prefs())
.expect("Failed to set preferences");
prefs::add_user_prefs(unprivileged_content.prefs());
// Enter the sandbox if necessary.
if opts::get().sandbox {