Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTK][WPE] WebsiteDataManger created by persistent network session should never return NULL for base cache and data directories #9216

Merged

Conversation

carlosgcampos
Copy link
Contributor

@carlosgcampos carlosgcampos commented Jan 27, 2023

86dd3d7

[GTK][WPE] WebsiteDataManger created by persistent network session should never return NULL for base cache and data directories
https://bugs.webkit.org/show_bug.cgi?id=251255

Reviewed by Adrian Perez de Castro.

When NULL is passed to network session constructor the default directory
is provided to website data manager to ensure the getters don't return
NULL.

* Source/WebKit/UIProcess/API/glib/WebKitNetworkSession.cpp:
(webkitNetworkSessionSetProperty):
(webkitNetworkSessionConstructed):
* Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkitWebsiteDataManagerSetProperty):
(webkitWebsiteDataManagerConstructed):
(webkitWebsiteDataManagerGetDataStore):
(webkitWebsiteDataManagerCreate):
(webkit_website_data_manager_get_base_data_directory):
(webkit_website_data_manager_get_base_cache_directory):
(webkitWebsiteDataManagerGetFaviconDatabasePath):
* Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManagerPrivate.h:
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:
* Source/WebKit/UIProcess/glib/WebsiteDataStoreGLib.cpp:
(WebKit::WebsiteDataStore::defaultBaseCacheDirectory):
(WebKit::WebsiteDataStore::defaultBaseDataDirectory):
(WebKit::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(WebKit::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration):

Canonical link: https://commits.webkit.org/259480@main

23edb3b

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1   πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  watch-sim
βœ… πŸ›  πŸ§ͺ unsafe-merge

@carlosgcampos carlosgcampos requested review from a team and cdumez as code owners January 27, 2023 09:40
@carlosgcampos carlosgcampos self-assigned this Jan 27, 2023
@carlosgcampos carlosgcampos added the WebKitGTK Bugs related to the Gtk API layer. label Jan 27, 2023
@carlosgcampos carlosgcampos added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 27, 2023
…ould never return NULL for base cache and data directories

https://bugs.webkit.org/show_bug.cgi?id=251255

Reviewed by Adrian Perez de Castro.

When NULL is passed to network session constructor the default directory
is provided to website data manager to ensure the getters don't return
NULL.

* Source/WebKit/UIProcess/API/glib/WebKitNetworkSession.cpp:
(webkitNetworkSessionSetProperty):
(webkitNetworkSessionConstructed):
* Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkitWebsiteDataManagerSetProperty):
(webkitWebsiteDataManagerConstructed):
(webkitWebsiteDataManagerGetDataStore):
(webkitWebsiteDataManagerCreate):
(webkit_website_data_manager_get_base_data_directory):
(webkit_website_data_manager_get_base_cache_directory):
(webkitWebsiteDataManagerGetFaviconDatabasePath):
* Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManagerPrivate.h:
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:
* Source/WebKit/UIProcess/glib/WebsiteDataStoreGLib.cpp:
(WebKit::WebsiteDataStore::defaultBaseCacheDirectory):
(WebKit::WebsiteDataStore::defaultBaseDataDirectory):
(WebKit::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(WebKit::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataConfiguration):

Canonical link: https://commits.webkit.org/259480@main
@webkit-commit-queue
Copy link
Collaborator

Committed 259480@main (86dd3d7): https://commits.webkit.org/259480@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 86dd3d7 into WebKit:main Jan 27, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 27, 2023
@carlosgcampos carlosgcampos deleted the wk-default-base-dirs branch January 27, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKitGTK Bugs related to the Gtk API layer.
Projects
None yet
4 participants