diff options
author | Mukilan Thiyagarajan <mukilan@igalia.com> | 2024-12-17 14:32:50 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-17 09:02:50 +0000 |
commit | 1e17dfdf31f0741632720889a1da0870d2e9ee06 (patch) | |
tree | ffa1105455de0d2697ca0dd7e56ab3ae5c1ddb56 /components | |
parent | 6cddb88f6446a3de8437137891f9046fc00d7b26 (diff) | |
download | servo-1e17dfdf31f0741632720889a1da0870d2e9ee06.tar.gz servo-1e17dfdf31f0741632720889a1da0870d2e9ee06.zip |
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>
Diffstat (limited to 'components')
-rw-r--r-- | components/servo/lib.rs | 4 |
1 files changed, 1 insertions, 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 { |