Bug 251808

Summary: Many unimplemented storage paths in WebsiteDataStore.cpp
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, jeremyj-wk, mcatanzaro, sihui_liu, webkit-bug-importer
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Unspecified   

Description Michael Catanzaro 2023-02-06 11:06:22 PST
We have in WebsiteDataStore.cpp:

#if !PLATFORM(COCOA)
String WebsiteDataStore::defaultMediaCacheDirectory(const String&)
{
    // FIXME: Implement. https://bugs.webkit.org/show_bug.cgi?id=156369 and https://bugs.webkit.org/show_bug.cgi?id=156370
    return String();
}
String WebsiteDataStore::defaultAlternativeServicesDirectory(const String&)
{
    // FIXME: Implement.
    return String();
}
String WebsiteDataStore::defaultJavaScriptConfigurationDirectory(const String&)
{
    // FIXME: Implement.
    return String();
}

And also:

#if !USE(GLIB) && !PLATFORM(COCOA)
String WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory(const String&)
{
    // Not implemented.
    return String();
}
#endif

Since these are in a cross-platform file, port maintainers will never know that they need to be implemented. :(

I wonder what has happened due to lack of default values for these data types? Hopefully the data is just not stored at all, and is not being stored outside permitted storage locations?

Implementing should be easy enough except for JavaScript configuration. Media cache is surely cache. I have no clue what "alternative services" are, but I guess that goes under data? Device ID hash salts is data. But then we have JavaScript configuration, which is unfortunate because this is our first data type that is neither data nor cache, but config. I wonder precisely what configuration is stored; perhaps we could pretend it's close enough to data? More likely, we might need to expose a base config dir if WebKit will be storing configuration in addition to data and cache. If so, should decide ASAP before stabilizing the new GTK/WPE API.
Comment 1 Michael Catanzaro 2023-02-17 06:13:47 PST
*** Bug 242438 has been marked as a duplicate of this bug. ***
Comment 2 Michael Catanzaro 2023-02-17 11:25:19 PST
*** Bug 156369 has been marked as a duplicate of this bug. ***
Comment 3 Michael Catanzaro 2023-02-17 14:10:19 PST
Pull request: https://github.com/WebKit/WebKit/pull/10300
Comment 4 EWS 2023-02-18 08:04:17 PST
Committed 260511@main (4993fe63cf51): <https://commits.webkit.org/260511@main>

Reviewed commits have been landed. Closing PR #10300 and removing active labels.