Bug 237140 - Support Direct Mode propagation of CFPreferences types other than AnyApp/CurUser/AnyHost
Summary: Support Direct Mode propagation of CFPreferences types other than AnyApp/CurU...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Process Model (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-24 08:55 PST by Gavin
Modified: 2022-03-03 08:56 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin 2022-02-24 08:55:17 PST
Currently CFPreferences Direct Mode propagation between WebKit constellation processes only supports AnyApp/CurUser/AnyHost preference types:

void AuxiliaryProcess::setPreferenceValue(const String& domain, const String& key, id value)
{
    if (domain.isEmpty()) {
        CFPreferencesSetValue(key.createCFString().get(), (__bridge CFPropertyListRef)value, kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
#if ASSERT_ENABLED
        id valueAfterSetting = [[NSUserDefaults standardUserDefaults] objectForKey:key];
        ASSERT(valueAfterSetting == value || [valueAfterSetting isEqual:value] || key == "AppleLanguages");
#endif
    } else
        CFPreferencesSetValue(key.createCFString().get(), (__bridge CFPropertyListRef)value, domain.createCFString().get(), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
}

We should support propagation of other preference types too, for example CurrentHost.
Comment 1 Radar WebKit Bug Importer 2022-03-03 08:56:16 PST
<rdar://problem/89757052>