[BlackBerry] Clear local storage won't take effect until browser exit and relaunch
[WebKit-https.git] / Source / WebKit / blackberry / Api / WebPage.cpp
index 9235008..eba10fb 100644 (file)
@@ -4871,8 +4871,10 @@ void WebPage::clearCookies()
 
 void WebPage::clearLocalStorage()
 {
-    BlackBerry::WebKit::clearLocalStorage(d->m_page->groupName());
-    clearDatabase(d->m_page->groupName());
+    if (PageGroup* group = d->m_page->groupPtr()) {
+        if (StorageNamespace* storage = group->localStorage())
+            storage->clearAllOriginsForDeletion();
+    }
 }
 
 void WebPage::clearCredentials()