Simplify WebSecurityOrigin
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jun 2014 00:11:56 +0000 (00:11 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jun 2014 00:11:56 +0000 (00:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134049

Reviewed by Andreas Kling.

* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCreateFromString):
(WKSecurityOriginCreateFromDatabaseIdentifier):
(WKSecurityOriginCopyDatabaseIdentifier):
(WKSecurityOriginCopyToString):
(WKSecurityOriginCopyProtocol):
(WKSecurityOriginCopyHost):
(WKSecurityOriginGetPort):
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::securityOrigin):
(WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): Deleted.
(WebKit::WebSecurityOrigin::protocol): Deleted.
(WebKit::WebSecurityOrigin::host): Deleted.
(WebKit::WebSecurityOrigin::port): Deleted.
(WebKit::WebSecurityOrigin::databaseIdentifier): Deleted.
(WebKit::WebSecurityOrigin::toString): Deleted.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
(WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteEntriesForOrigin):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyDatabase):
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::didGetStorageDetailsByOrigin):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170133 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKSecurityOrigin.cpp
Source/WebKit2/Shared/WebSecurityOrigin.h
Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
Source/WebKit2/UIProcess/Storage/StorageManager.cpp
Source/WebKit2/UIProcess/Storage/StorageManager.h
Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.cpp
Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp
Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp
Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp
Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

index eeaf35d..ba533d8 100644 (file)
@@ -1,5 +1,58 @@
 2014-06-18  Anders Carlsson  <andersca@apple.com>
 
+        Simplify WebSecurityOrigin
+        https://bugs.webkit.org/show_bug.cgi?id=134049
+
+        Reviewed by Andreas Kling.
+
+        * Shared/API/c/WKSecurityOrigin.cpp:
+        (WKSecurityOriginCreateFromString):
+        (WKSecurityOriginCreateFromDatabaseIdentifier):
+        (WKSecurityOriginCopyDatabaseIdentifier):
+        (WKSecurityOriginCopyToString):
+        (WKSecurityOriginCopyProtocol):
+        (WKSecurityOriginCopyHost):
+        (WKSecurityOriginGetPort):
+        * Shared/WebSecurityOrigin.h:
+        (WebKit::WebSecurityOrigin::securityOrigin):
+        (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): Deleted.
+        (WebKit::WebSecurityOrigin::protocol): Deleted.
+        (WebKit::WebSecurityOrigin::host): Deleted.
+        (WebKit::WebSecurityOrigin::port): Deleted.
+        (WebKit::WebSecurityOrigin::databaseIdentifier): Deleted.
+        (WebKit::WebSecurityOrigin::toString): Deleted.
+        * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
+        (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
+        (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
+        * UIProcess/Storage/StorageManager.cpp:
+        (WebKit::StorageManager::deleteEntriesForOrigin):
+        * UIProcess/Storage/StorageManager.h:
+        * UIProcess/WebApplicationCacheManagerProxy.cpp:
+        (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
+        * UIProcess/WebDatabaseManagerProxy.cpp:
+        (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
+        (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
+        (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
+        (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
+        (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
+        (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
+        (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
+        * UIProcess/WebKeyValueStorageManager.cpp:
+        (WebKit::didGetStorageDetailsByOrigin):
+        * UIProcess/WebOriginDataManagerProxy.cpp:
+        (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::exceededDatabaseQuota):
+        (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
+        * UIProcess/WebResourceCacheManagerProxy.cpp:
+        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
+        * UIProcess/ios/WKGeolocationProviderIOS.mm:
+        (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::exceededDatabaseQuota):
+
+2014-06-18  Anders Carlsson  <andersca@apple.com>
+
         Add back WKPageRunJavaScriptInMainFrame_b for now
         https://bugs.webkit.org/show_bug.cgi?id=134045
         <rdar://problem/17368879>
index f729106..fce590f 100644 (file)
@@ -38,14 +38,12 @@ WKTypeID WKSecurityOriginGetTypeID()
 
 WKSecurityOriginRef WKSecurityOriginCreateFromString(WKStringRef string)
 {
-    RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::createFromString(toImpl(string)->string());
-    return toAPI(securityOrigin.release().leakRef());
+    return toAPI(WebSecurityOrigin::create(WebCore::SecurityOrigin::createFromString(toImpl(string)->string())).leakRef());
 }
 
 WKSecurityOriginRef WKSecurityOriginCreateFromDatabaseIdentifier(WKStringRef identifier)
 {
-    RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::createFromDatabaseIdentifier(toImpl(identifier)->string());
-    return toAPI(securityOrigin.release().leakRef());
+    return toAPI(WebSecurityOrigin::create(WebCore::SecurityOrigin::createFromDatabaseIdentifier((toImpl(identifier)->string()))).leakRef());
 }
 
 WKSecurityOriginRef WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port)
@@ -56,27 +54,27 @@ WKSecurityOriginRef WKSecurityOriginCreate(WKStringRef protocol, WKStringRef hos
 
 WKStringRef WKSecurityOriginCopyDatabaseIdentifier(WKSecurityOriginRef securityOrigin)
 {
-    return toCopiedAPI(toImpl(securityOrigin)->databaseIdentifier());
+    return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().databaseIdentifier());
 }
 
 WKStringRef WKSecurityOriginCopyToString(WKSecurityOriginRef securityOrigin)
 {
-    return toCopiedAPI(toImpl(securityOrigin)->toString());
+    return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().toString());
 }
 
 WKStringRef WKSecurityOriginCopyProtocol(WKSecurityOriginRef securityOrigin)
 {
-    return toCopiedAPI(toImpl(securityOrigin)->protocol());
+    return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().protocol());
 }
 
 WKStringRef WKSecurityOriginCopyHost(WKSecurityOriginRef securityOrigin)
 {
-    return toCopiedAPI(toImpl(securityOrigin)->host());
+    return toCopiedAPI(toImpl(securityOrigin)->securityOrigin().host());
 }
 
 unsigned short WKSecurityOriginGetPort(WKSecurityOriginRef securityOrigin)
 {
-    return toImpl(securityOrigin)->port();
+    return toImpl(securityOrigin)->securityOrigin().port();
 }
 
 // For backwards ABI compatibility.
index f52aa62..1056bef 100644 (file)
@@ -39,11 +39,6 @@ public:
         return create(WebCore::SecurityOrigin::createFromString(string));
     }
 
-    static PassRefPtr<WebSecurityOrigin> createFromDatabaseIdentifier(const String& identifier)
-    {
-        return create(WebCore::SecurityOrigin::createFromDatabaseIdentifier(identifier));
-    }
-
     static PassRefPtr<WebSecurityOrigin> create(const String& protocol, const String& host, int port)
     {
         return create(WebCore::SecurityOrigin::create(protocol, host, port));
@@ -56,18 +51,7 @@ public:
         return adoptRef(new WebSecurityOrigin(securityOrigin));
     }
 
-    String protocol() const { return m_securityOrigin->protocol(); }
-    String host() const { return m_securityOrigin->host(); }
-    unsigned short port() const { return m_securityOrigin->port(); }
-
-    String databaseIdentifier() const { return m_securityOrigin->databaseIdentifier(); }
-    String toString() const { return m_securityOrigin->toString(); }
-
-    WebCore::SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
-
-#if PLATFORM(IOS)
-    WebCore::SecurityOrigin* securityOrigin() { return m_securityOrigin.get(); }
-#endif // PLATFORM(IOS)
+    const WebCore::SecurityOrigin& securityOrigin() const { return *m_securityOrigin; }
 
 private:
     WebSecurityOrigin(PassRefPtr<WebCore::SecurityOrigin> securityOrigin)
index 419f894..d32d049 100644 (file)
@@ -237,7 +237,7 @@ void WebNotificationManagerProxy::providerDidUpdateNotificationPolicy(const WebS
     if (!context())
         return;
 
-    context()->sendToAllProcesses(Messages::WebNotificationManager::DidUpdateNotificationDecision(origin->toString(), allowed));
+    context()->sendToAllProcesses(Messages::WebNotificationManager::DidUpdateNotificationDecision(origin->securityOrigin().toString(), allowed));
 }
 
 void WebNotificationManagerProxy::providerDidRemoveNotificationPolicies(API::Array* origins)
@@ -253,7 +253,7 @@ void WebNotificationManagerProxy::providerDidRemoveNotificationPolicies(API::Arr
     originStrings.reserveInitialCapacity(size);
     
     for (size_t i = 0; i < size; ++i)
-        originStrings.append(origins->at<WebSecurityOrigin>(i)->toString());
+        originStrings.append(origins->at<WebSecurityOrigin>(i)->securityOrigin().toString());
     
     context()->sendToAllProcesses(Messages::WebNotificationManager::DidRemoveNotificationDecisions(originStrings));
 }
index e576545..cf6f53b 100644 (file)
@@ -427,9 +427,9 @@ void StorageManager::getStorageDetailsByOrigin(FunctionDispatcher& callbackDispa
     m_queue->dispatch(bind(&StorageManager::getStorageDetailsByOriginInternal, this, RefPtr<FunctionDispatcher>(&callbackDispatcher), context, callback));
 }
 
-void StorageManager::deleteEntriesForOrigin(SecurityOrigin* securityOrigin)
+void StorageManager::deleteEntriesForOrigin(const SecurityOrigin& securityOrigin)
 {
-    m_queue->dispatch(bind(&StorageManager::deleteEntriesForOriginInternal, this, RefPtr<SecurityOrigin>(securityOrigin)));
+    m_queue->dispatch(bind(&StorageManager::deleteEntriesForOriginInternal, this, RefPtr<SecurityOrigin>(const_cast<SecurityOrigin*>(&securityOrigin))));
 }
 
 void StorageManager::deleteAllEntries()
index 5172b0e..56f4b6e 100644 (file)
@@ -62,7 +62,7 @@ public:
     // support arguments in functions.
     void getOrigins(FunctionDispatcher& callbackDispatcher, void* context, void (*callback)(const Vector<RefPtr<WebCore::SecurityOrigin>>&, void* context));
     void getStorageDetailsByOrigin(FunctionDispatcher& callbackDispatcher, void* context, void (*callback)(const Vector<LocalStorageDetails>&, void* context));
-    void deleteEntriesForOrigin(WebCore::SecurityOrigin*);
+    void deleteEntriesForOrigin(const WebCore::SecurityOrigin&);
     void deleteAllEntries();
 
 private:
index 3a3c88c..4fabd30 100644 (file)
@@ -108,9 +108,9 @@ void WebApplicationCacheManagerProxy::deleteEntriesForOrigin(WebSecurityOrigin*
         return;
 
     SecurityOriginData securityOriginData;
-    securityOriginData.protocol = origin->protocol();
-    securityOriginData.host = origin->host();
-    securityOriginData.port = origin->port();
+    securityOriginData.protocol = origin->securityOrigin().protocol();
+    securityOriginData.host = origin->securityOrigin().host();
+    securityOriginData.port = origin->securityOrigin().port();
 
     // FIXME (Multi-WebProcess): <rdar://problem/12239765> Make manipulating cache information work with per-tab WebProcess.
     context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebApplicationCacheManager::DeleteEntriesForOrigin(securityOriginData));
index f57132d..c20df2f 100644 (file)
@@ -173,7 +173,7 @@ void WebDatabaseManagerProxy::didGetDatabasesByOrigin(const Vector<OriginAndData
     result.reserveInitialCapacity(originAndDatabasesVector.size());
 
     for (const auto& originAndDatabases : originAndDatabasesVector) {
-        RefPtr<API::Object> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originAndDatabases.originIdentifier);
+        RefPtr<API::Object> origin = WebSecurityOrigin::create(SecurityOrigin::createFromDatabaseIdentifier(originAndDatabases.originIdentifier));
 
         Vector<RefPtr<API::Object>> databases;
         databases.reserveInitialCapacity(originAndDatabases.databases.size());
@@ -226,19 +226,19 @@ void WebDatabaseManagerProxy::didGetDatabaseOrigins(const Vector<String>& origin
     securityOrigins.reserveInitialCapacity(originIdentifiers.size());
 
     for (const auto& originIdentifier : originIdentifiers)
-        securityOrigins.uncheckedAppend(WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier));
+        securityOrigins.uncheckedAppend(WebSecurityOrigin::create(SecurityOrigin::createFromDatabaseIdentifier(originIdentifier)));
 
     callback->performCallbackWithReturnValue(API::Array::create(std::move(securityOrigins)).get());
 }
 
 void WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin(const String& databaseIdentifier, WebSecurityOrigin* origin)
 {
-    context()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabaseWithNameForOrigin(databaseIdentifier, origin->databaseIdentifier()));
+    context()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabaseWithNameForOrigin(databaseIdentifier, origin->securityOrigin().databaseIdentifier()));
 }
 
 void WebDatabaseManagerProxy::deleteDatabasesForOrigin(WebSecurityOrigin* origin)
 {
-    context()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabasesForOrigin(origin->databaseIdentifier()));
+    context()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabasesForOrigin(origin->securityOrigin().databaseIdentifier()));
 }
 
 void WebDatabaseManagerProxy::deleteAllDatabases()
@@ -248,18 +248,18 @@ void WebDatabaseManagerProxy::deleteAllDatabases()
 
 void WebDatabaseManagerProxy::setQuotaForOrigin(WebSecurityOrigin* origin, uint64_t quota)
 {
-    context()->sendToOneProcess(Messages::WebDatabaseManager::SetQuotaForOrigin(origin->databaseIdentifier(), quota));
+    context()->sendToOneProcess(Messages::WebDatabaseManager::SetQuotaForOrigin(origin->securityOrigin().databaseIdentifier(), quota));
 }
 
 void WebDatabaseManagerProxy::didModifyOrigin(const String& originIdentifier)
 {
-    RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
+    RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::create(SecurityOrigin::createFromDatabaseIdentifier(originIdentifier));
     m_client.didModifyOrigin(this, origin.get());
 }
 
 void WebDatabaseManagerProxy::didModifyDatabase(const String& originIdentifier, const String& databaseIdentifier)
 {
-    RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
+    RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::create(SecurityOrigin::createFromDatabaseIdentifier(originIdentifier));
     m_client.didModifyDatabase(this, origin.get(), databaseIdentifier);
 }
 
index ce6e630..51d3817 100644 (file)
@@ -114,7 +114,7 @@ static void didGetStorageDetailsByOrigin(const Vector<LocalStorageDetails>& stor
     for (const LocalStorageDetails& originDetails : storageDetails) {
         HashMap<String, RefPtr<API::Object>> detailsMap;
 
-        RefPtr<API::Object> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originDetails.originIdentifier);
+        RefPtr<API::Object> origin = WebSecurityOrigin::create(SecurityOrigin::createFromDatabaseIdentifier(originDetails.originIdentifier));
 
         detailsMap.set(WebKeyValueStorageManager::originKey(), origin);
         if (originDetails.creationTime)
index 0d52423..056041f 100644 (file)
@@ -108,9 +108,9 @@ void WebOriginDataManagerProxy::deleteEntriesForOrigin(WKOriginDataTypes types,
         return;
 
     SecurityOriginData securityOriginData;
-    securityOriginData.protocol = origin->protocol();
-    securityOriginData.host = origin->host();
-    securityOriginData.port = origin->port();
+    securityOriginData.protocol = origin->securityOrigin().protocol();
+    securityOriginData.host = origin->securityOrigin().host();
+    securityOriginData.port = origin->securityOrigin().port();
 
     // FIXME (Multi-WebProcess): <rdar://problem/12239765> Make manipulating cache information work with per-tab WebProcess.
     context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebOriginDataManager::DeleteEntriesForOrigin(types, securityOriginData));
index 6125e03..62234a0 100644 (file)
@@ -4490,7 +4490,7 @@ void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originI
         WebFrameProxy* frame = m_process->webFrame(record->frameID);
         MESSAGE_CHECK(frame);
 
-        RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(record->originIdentifier);
+        RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::create(SecurityOrigin::createFromDatabaseIdentifier(record->originIdentifier));
 
         uint64_t newQuota = m_uiClient->exceededDatabaseQuota(this, frame, origin.get(),
             record->databaseName, record->displayName, record->currentQuota,
@@ -4507,7 +4507,7 @@ void WebPageProxy::requestGeolocationPermissionForFrame(uint64_t geolocationID,
     MESSAGE_CHECK(frame);
 
     // FIXME: Geolocation should probably be using toString() as its string representation instead of databaseIdentifier().
-    RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
+    RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::create(SecurityOrigin::createFromDatabaseIdentifier(originIdentifier));
     RefPtr<GeolocationPermissionRequestProxy> request = m_geolocationPermissionRequestManager.createRequest(geolocationID);
 
     if (m_uiClient->decidePolicyForGeolocationPermissionRequest(this, frame, origin.get(), request.get()))
index 966b718..f920ae2 100644 (file)
@@ -107,9 +107,9 @@ void WebResourceCacheManagerProxy::didGetCacheOrigins(const Vector<SecurityOrigi
 void WebResourceCacheManagerProxy::clearCacheForOrigin(WebSecurityOrigin* origin, ResourceCachesToClear cachesToClear)
 {
     SecurityOriginData securityOrigin;
-    securityOrigin.protocol = origin->protocol();
-    securityOrigin.host = origin->host();
-    securityOrigin.port = origin->port();
+    securityOrigin.protocol = origin->securityOrigin().protocol();
+    securityOrigin.host = origin->securityOrigin().host();
+    securityOrigin.port = origin->securityOrigin().port();
 
     // FIXME (Multi-WebProcess): <rdar://problem/12239765> There is no need to relaunch all processes. One process to take care of persistent cache is enough.
     context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForOrigin(securityOrigin, cachesToClear));
index 198de14..252f7bd 100644 (file)
@@ -154,7 +154,7 @@ static void setEnableHighAccuracy(WKGeolocationManagerRef geolocationManager, bo
 {
     // Step 1: ask the user if the app can use Geolocation.
     GeolocationRequestData geolocationRequestData;
-    geolocationRequestData.origin = toImpl(origin)->securityOrigin();
+    geolocationRequestData.origin = const_cast<WebCore::SecurityOrigin*>(&toImpl(origin)->securityOrigin());
     geolocationRequestData.frame = toImpl(frame);
     geolocationRequestData.permissionRequest = toImpl(permissionRequest);
     geolocationRequestData.window = window;
index 7a58591..ab10317 100644 (file)
@@ -648,7 +648,7 @@ void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& database
     uint64_t currentQuota = dbManager.quotaForOrigin(origin);
     uint64_t currentOriginUsage = dbManager.usageForOrigin(origin);
     uint64_t newQuota = 0;
-    RefPtr<WebSecurityOrigin> webSecurityOrigin = WebSecurityOrigin::createFromDatabaseIdentifier(origin->databaseIdentifier());
+    RefPtr<WebSecurityOrigin> webSecurityOrigin = WebSecurityOrigin::create(WebCore::SecurityOrigin::createFromDatabaseIdentifier(origin->databaseIdentifier()));
     newQuota = m_page->injectedBundleUIClient().didExceedDatabaseQuota(m_page, webSecurityOrigin.get(), databaseName, details.displayName(), currentQuota, currentOriginUsage, details.currentUsage(), details.expectedUsage());
 
     if (!newQuota) {