Title: [185460] trunk/Source/WebKit2
- Revision
- 185460
- Author
- [email protected]
- Date
- 2015-06-11 10:45:35 -0700 (Thu, 11 Jun 2015)
Log Message
Make WKWebsiteDataStoreRef backed by an API::WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=145882
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetPluginSiteDataManager):
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerGetTypeID):
(WKPluginSiteDataManagerGetSitesWithData):
(WKPluginSiteDataManagerClearSiteData):
(WKPluginSiteDataManagerClearAllSiteData):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (185459 => 185460)
--- trunk/Source/WebKit2/ChangeLog 2015-06-11 17:20:53 UTC (rev 185459)
+++ trunk/Source/WebKit2/ChangeLog 2015-06-11 17:45:35 UTC (rev 185460)
@@ -1,3 +1,19 @@
+2015-06-11 Anders Carlsson <[email protected]>
+
+ Make WKWebsiteDataStoreRef backed by an API::WebsiteDataStore
+ https://bugs.webkit.org/show_bug.cgi?id=145882
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/API/C/WKAPICast.h:
+ * UIProcess/API/C/WKContext.cpp:
+ (WKContextGetPluginSiteDataManager):
+ * UIProcess/API/C/WKPluginSiteDataManager.cpp:
+ (WKPluginSiteDataManagerGetTypeID):
+ (WKPluginSiteDataManagerGetSitesWithData):
+ (WKPluginSiteDataManagerClearSiteData):
+ (WKPluginSiteDataManagerClearAllSiteData):
+
2015-06-11 Antti Koivisto <[email protected]>
Network process crashes decoding invalid cache entry on 32bit system
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (185459 => 185460)
--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2015-06-11 17:20:53 UTC (rev 185459)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2015-06-11 17:45:35 UTC (rev 185460)
@@ -157,7 +157,6 @@
WK_ADD_API_MAPPING(WKPageGroupRef, WebPageGroup)
WK_ADD_API_MAPPING(WKPageConfigurationRef, API::PageConfiguration)
WK_ADD_API_MAPPING(WKPageRef, WebPageProxy)
-WK_ADD_API_MAPPING(WKPluginSiteDataManagerRef, WebPluginSiteDataManager)
WK_ADD_API_MAPPING(WKPreferencesRef, WebPreferences)
WK_ADD_API_MAPPING(WKProtectionSpaceRef, WebProtectionSpace)
WK_ADD_API_MAPPING(WKRenderLayerRef, WebRenderLayer)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp (185459 => 185460)
--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp 2015-06-11 17:20:53 UTC (rev 185459)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp 2015-06-11 17:45:35 UTC (rev 185460)
@@ -464,13 +464,13 @@
return toAPI(toImpl(contextRef)->supplement<WebNotificationManagerProxy>());
}
-WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef contextRef)
+WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context)
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- return toAPI(toImpl(contextRef)->pluginSiteDataManager());
+ return reinterpret_cast<WKPluginSiteDataManagerRef>(toAPI(toImpl(context)->websiteDataStore()));
#else
- UNUSED_PARAM(contextRef);
- return 0;
+ UNUSED_PARAM(context);
+ return nullptr;
#endif
}
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPluginSiteDataManager.cpp (185459 => 185460)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPluginSiteDataManager.cpp 2015-06-11 17:20:53 UTC (rev 185459)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPluginSiteDataManager.cpp 2015-06-11 17:45:35 UTC (rev 185460)
@@ -36,17 +36,13 @@
WKTypeID WKPluginSiteDataManagerGetTypeID()
{
-#if ENABLE(NETSCAPE_PLUGIN_API)
- return toAPI(WebPluginSiteDataManager::APIType);
-#else
- return toAPI(API::Object::Type::Null);
-#endif
+ return toAPI(API::WebsiteDataStore::APIType);
}
void WKPluginSiteDataManagerGetSitesWithData(WKPluginSiteDataManagerRef manager, void* context, WKPluginSiteDataManagerGetSitesWithDataFunction callback)
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- auto& websiteDataStore = toImpl(manager)->processPool().websiteDataStore()->websiteDataStore();
+ auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(manager))->websiteDataStore();
websiteDataStore.fetchData(WebsiteDataTypes::WebsiteDataTypePlugInData, [context, callback](Vector<WebsiteDataRecord> dataRecords) {
Vector<String> hostNames;
for (const auto& dataRecord : dataRecords) {
@@ -74,7 +70,7 @@
for (const auto& string : toImpl(sites)->elementsOfType<API::String>())
dataRecord.pluginDataHostNames.add(string->string());
- auto& websiteDataStore = toImpl(manager)->processPool().websiteDataStore()->websiteDataStore();
+ auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(manager))->websiteDataStore();
websiteDataStore.removeData(WebsiteDataTypes::WebsiteDataTypePlugInData, { dataRecord }, [context, callback] {
callback(nullptr, context);
});
@@ -91,7 +87,7 @@
void WKPluginSiteDataManagerClearAllSiteData(WKPluginSiteDataManagerRef manager, void* context, WKPluginSiteDataManagerClearSiteDataFunction callback)
{
#if ENABLE(NETSCAPE_PLUGIN_API)
- auto& websiteDataStore = toImpl(manager)->processPool().websiteDataStore()->websiteDataStore();
+ auto& websiteDataStore = toImpl(reinterpret_cast<WKWebsiteDataStoreRef>(manager))->websiteDataStore();
websiteDataStore.removeData(WebsiteDataTypes::WebsiteDataTypePlugInData, std::chrono::system_clock::time_point::min(), [context, callback] {
callback(nullptr, context);
});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes