From 1e17dfdf31f0741632720889a1da0870d2e9ee06 Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Tue, 17 Dec 2024 14:32:50 +0530 Subject: [PATCH] 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 --- components/servo/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 038ca186fba..3be1160133c 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -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 {