Title: [194124] trunk/Source/WebKit2
- Revision
- 194124
- Author
- [email protected]
- Date
- 2015-12-15 16:52:55 -0800 (Tue, 15 Dec 2015)
Log Message
Call DatabaseManager directly from WKBundle.cpp
https://bugs.webkit.org/show_bug.cgi?id=152317
Reviewed by Tim Horton.
This is in preparation for getting rid of some old database manager code.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleClearAllDatabases):
(WKBundleSetDatabaseQuota):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearAllDatabases): Deleted.
(WebKit::InjectedBundle::setDatabaseQuota): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (194123 => 194124)
--- trunk/Source/WebKit2/ChangeLog 2015-12-16 00:23:49 UTC (rev 194123)
+++ trunk/Source/WebKit2/ChangeLog 2015-12-16 00:52:55 UTC (rev 194124)
@@ -1,3 +1,20 @@
+2015-12-15 Anders Carlsson <[email protected]>
+
+ Call DatabaseManager directly from WKBundle.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=152317
+
+ Reviewed by Tim Horton.
+
+ This is in preparation for getting rid of some old database manager code.
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleClearAllDatabases):
+ (WKBundleSetDatabaseQuota):
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::clearAllDatabases): Deleted.
+ (WebKit::InjectedBundle::setDatabaseQuota): Deleted.
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+
2015-12-15 Daniel Bates <[email protected]>
Guard code that uses class LayerTreeHost with USE(COORDINATED_GRAPHICS) or USE(TEXTURE_MAPPER)
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (194123 => 194124)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2015-12-16 00:23:49 UTC (rev 194123)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2015-12-16 00:52:55 UTC (rev 194124)
@@ -37,7 +37,9 @@
#include "WebFrame.h"
#include "WebPage.h"
#include "WebPageGroupProxy.h"
+#include <WebCore/DatabaseManager.h>
+using namespace WebCore;
using namespace WebKit;
WKTypeID WKBundleGetTypeID()
@@ -198,14 +200,16 @@
InjectedBundle::reportException(context, exception);
}
-void WKBundleClearAllDatabases(WKBundleRef bundleRef)
+void WKBundleClearAllDatabases(WKBundleRef)
{
- toImpl(bundleRef)->clearAllDatabases();
+ DatabaseManager::singleton().deleteAllDatabases();
}
void WKBundleSetDatabaseQuota(WKBundleRef bundleRef, uint64_t quota)
{
- toImpl(bundleRef)->setDatabaseQuota(quota);
+ // Historically, we've used the following (somewhat non-sensical) string
+ // for the databaseIdentifier of local files.
+ DatabaseManager::singleton().setQuota(SecurityOrigin::createFromDatabaseIdentifier("file__0").ptr(), quota);
}
WKDataRef WKBundleCreateWKDataFromUInt8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data)
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (194123 => 194124)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2015-12-16 00:23:49 UTC (rev 194123)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2015-12-16 00:52:55 UTC (rev 194124)
@@ -342,18 +342,6 @@
(*iter)->settings().setAsynchronousSpellCheckingEnabled(enabled);
}
-void InjectedBundle::clearAllDatabases()
-{
- WebProcess::singleton().supplement<WebDatabaseManager>()->deleteAllDatabases();
-}
-
-void InjectedBundle::setDatabaseQuota(uint64_t quota)
-{
- // Historically, we've used the following (somewhat non-sensical) string
- // for the databaseIdentifier of local files.
- WebProcess::singleton().supplement<WebDatabaseManager>()->setQuotaForOrigin("file__0", quota);
-}
-
int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
{
Frame* coreFrame = frame ? frame->coreFrame() : 0;
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (194123 => 194124)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2015-12-16 00:23:49 UTC (rev 194123)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2015-12-16 00:52:55 UTC (rev 194124)
@@ -133,10 +133,6 @@
void removeUserStyleSheets(WebPageGroupProxy*, InjectedBundleScriptWorld*);
void removeAllUserContent(WebPageGroupProxy*);
- // Local storage API
- void clearAllDatabases();
- void setDatabaseQuota(uint64_t);
-
// Garbage collection API
void garbageCollectJavaScriptObjects();
void garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging(bool waitUntilDone);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes