Title: [154618] trunk/Source
Revision
154618
Author
psola...@apple.com
Date
2013-08-26 10:57:00 -0700 (Mon, 26 Aug 2013)

Log Message

PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319

Reviewed by Andreas Kling.

PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().

Source/WebCore:

* Modules/indexeddb/IDBFactory.cpp:
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::groupSettings):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):

Source/WebKit/gtk:

* webkit/webkitwebdatabase.cpp:
(webkit_set_web_database_directory_path):

Source/WebKit2:

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154617 => 154618)


--- trunk/Source/WebCore/ChangeLog	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebCore/ChangeLog	2013-08-26 17:57:00 UTC (rev 154618)
@@ -1,3 +1,22 @@
+2013-08-26  Pratik Solanki  <psola...@apple.com>
+
+        PageGroup::groupSettings() should return a reference
+        https://bugs.webkit.org/show_bug.cgi?id=120319
+
+        Reviewed by Andreas Kling.
+
+        PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
+
+        * Modules/indexeddb/IDBFactory.cpp:
+        * page/PageGroup.h:
+        (WebCore::PageGroup::groupSettings):
+        * storage/StorageNamespaceImpl.cpp:
+        (WebCore::StorageNamespaceImpl::localStorageNamespace):
+        * workers/DefaultSharedWorkerRepository.cpp:
+        (WebCore::SharedWorkerProxy::groupSettings):
+        * workers/WorkerMessagingProxy.cpp:
+        (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
+
 2013-08-26  Andreas Kling  <akl...@apple.com>
 
         WebCore: Let Page create the main Frame.

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (154617 => 154618)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2013-08-26 17:57:00 UTC (rev 154618)
@@ -86,7 +86,7 @@
     ASSERT(isContextValid(context));
     if (context->isDocument()) {
         Document* document = toDocument(context);
-        return document->page()->group().groupSettings()->indexedDBDatabasePath();
+        return document->page()->group().groupSettings().indexedDBDatabasePath();
     }
 #if ENABLE(WORKERS)
     WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(context);

Modified: trunk/Source/WebCore/page/PageGroup.h (154617 => 154618)


--- trunk/Source/WebCore/page/PageGroup.h	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebCore/page/PageGroup.h	2013-08-26 17:57:00 UTC (rev 154618)
@@ -108,7 +108,7 @@
         const UserScriptMap* userScripts() const { return m_userScripts.get(); }
         const UserStyleSheetMap* userStyleSheets() const { return m_userStyleSheets.get(); }
 
-        GroupSettings* groupSettings() const { return m_groupSettings.get(); }
+        GroupSettings& groupSettings() const { return *m_groupSettings; }
 
 #if ENABLE(VIDEO_TRACK)
         void captionPreferencesChanged();
@@ -135,7 +135,7 @@
         OwnPtr<UserScriptMap> m_userScripts;
         OwnPtr<UserStyleSheetMap> m_userStyleSheets;
 
-        OwnPtr<GroupSettings> m_groupSettings;
+        const OwnPtr<GroupSettings> m_groupSettings;
 
 #if ENABLE(VIDEO_TRACK)
         OwnPtr<CaptionUserPreferences> m_captionPreferences;

Modified: trunk/Source/WebCore/storage/StorageNamespaceImpl.cpp (154617 => 154618)


--- trunk/Source/WebCore/storage/StorageNamespaceImpl.cpp	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebCore/storage/StorageNamespaceImpl.cpp	2013-08-26 17:57:00 UTC (rev 154618)
@@ -57,7 +57,7 @@
     // at this point we're stuck with it.
     Page* page = *pageGroup->pages().begin();
     const String& path = page->settings().localStorageDatabasePath();
-    unsigned quota = pageGroup->groupSettings()->localStorageQuotaBytes();
+    unsigned quota = pageGroup->groupSettings().localStorageQuotaBytes();
     const String lookupPath = path.isNull() ? emptyString() : path;
 
     LocalStorageNamespaceMap::AddResult result = localStorageNamespaceMap().add(lookupPath, 0);

Modified: trunk/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp (154617 => 154618)


--- trunk/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp	2013-08-26 17:57:00 UTC (rev 154618)
@@ -173,7 +173,7 @@
     // Just pick the first active document, and use the groupsettings of that page.
     Document* document = *(m_workerDocuments.begin());
     if (document->page())
-        return document->page()->group().groupSettings();
+        return &document->page()->group().groupSettings();
 
     return 0;
 }

Modified: trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp (154617 => 154618)


--- trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp	2013-08-26 17:57:00 UTC (rev 154618)
@@ -303,7 +303,7 @@
     Document* document = static_cast<Document*>(m_scriptExecutionContext.get());
     GroupSettings* settings = 0;
     if (document->page())
-        settings = document->page()->group().groupSettings();
+        settings = &document->page()->group().groupSettings();
     RefPtr<DedicatedWorkerThread> thread = DedicatedWorkerThread::create(scriptURL, userAgent, settings, sourceCode, *this, *this, startMode, document->contentSecurityPolicy()->deprecatedHeader(), document->contentSecurityPolicy()->deprecatedHeaderType(), document->topOrigin());
     workerThreadCreated(thread);
     thread->start();

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (154617 => 154618)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-08-26 17:57:00 UTC (rev 154618)
@@ -5851,14 +5851,14 @@
     coreSettings->setLocalStorageEnabled(webSettings->isLocalStorageEnabled());
     coreSettings->setOfflineWebApplicationCacheEnabled(webSettings->isAppCacheEnabled());
 
-    m_page->group().groupSettings()->setLocalStorageQuotaBytes(webSettings->localStorageQuota());
+    m_page->group().groupSettings().setLocalStorageQuotaBytes(webSettings->localStorageQuota());
     coreSettings->setSessionStorageQuota(webSettings->sessionStorageQuota());
     coreSettings->setUsesPageCache(webSettings->maximumPagesInCache());
     coreSettings->setFrameFlatteningEnabled(webSettings->isFrameFlatteningEnabled());
 #endif
 
 #if ENABLE(INDEXED_DATABASE)
-    m_page->group().groupSettings()->setIndexedDBDatabasePath(webSettings->indexedDataBasePath());
+    m_page->group().groupSettings().setIndexedDBDatabasePath(webSettings->indexedDataBasePath());
 #endif
 
 

Modified: trunk/Source/WebKit/blackberry/ChangeLog (154617 => 154618)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-08-26 17:57:00 UTC (rev 154618)
@@ -1,3 +1,15 @@
+2013-08-26  Pratik Solanki  <psola...@apple.com>
+
+        PageGroup::groupSettings() should return a reference
+        https://bugs.webkit.org/show_bug.cgi?id=120319
+
+        Reviewed by Andreas Kling.
+
+        PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
+
 2013-08-24  Darin Adler  <da...@apple.com>
 
         Frame::tree should return a reference instead of a pointer

Modified: trunk/Source/WebKit/gtk/ChangeLog (154617 => 154618)


--- trunk/Source/WebKit/gtk/ChangeLog	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebKit/gtk/ChangeLog	2013-08-26 17:57:00 UTC (rev 154618)
@@ -1,3 +1,15 @@
+2013-08-26  Pratik Solanki  <psola...@apple.com>
+
+        PageGroup::groupSettings() should return a reference
+        https://bugs.webkit.org/show_bug.cgi?id=120319
+
+        Reviewed by Andreas Kling.
+
+        PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
+
+        * webkit/webkitwebdatabase.cpp:
+        (webkit_set_web_database_directory_path):
+
 2013-08-26  Andreas Kling  <akl...@apple.com>
 
         WebCore: Let Page create the main Frame.

Modified: trunk/Source/WebKit/gtk/webkit/webkitwebdatabase.cpp (154617 => 154618)


--- trunk/Source/WebKit/gtk/webkit/webkitwebdatabase.cpp	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebdatabase.cpp	2013-08-26 17:57:00 UTC (rev 154618)
@@ -491,7 +491,7 @@
 #endif
 
 #if ENABLE(INDEXED_DATABASE)
-    WebCore::PageGroup::pageGroup(webkitPageGroupName())->groupSettings()->setIndexedDBDatabasePath(pathString);
+    WebCore::PageGroup::pageGroup(webkitPageGroupName())->groupSettings().setIndexedDBDatabasePath(pathString);
 #endif
 
 }

Modified: trunk/Source/WebKit2/ChangeLog (154617 => 154618)


--- trunk/Source/WebKit2/ChangeLog	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-26 17:57:00 UTC (rev 154618)
@@ -1,3 +1,15 @@
+2013-08-26  Pratik Solanki  <psola...@apple.com>
+
+        PageGroup::groupSettings() should return a reference
+        https://bugs.webkit.org/show_bug.cgi?id=120319
+
+        Reviewed by Andreas Kling.
+
+        PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
+
+        * WebProcess/Storage/StorageNamespaceImpl.cpp:
+        (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
+
 2013-08-26  Andreas Kling  <akl...@apple.com>
 
         WebCore: Let Page create the main Frame.

Modified: trunk/Source/WebKit2/WebProcess/Storage/StorageNamespaceImpl.cpp (154617 => 154618)


--- trunk/Source/WebKit2/WebProcess/Storage/StorageNamespaceImpl.cpp	2013-08-26 17:55:41 UTC (rev 154617)
+++ trunk/Source/WebKit2/WebProcess/Storage/StorageNamespaceImpl.cpp	2013-08-26 17:57:00 UTC (rev 154618)
@@ -56,7 +56,7 @@
     if (!result.isNewEntry)
         return result.iterator->value;
 
-    unsigned quota = pageGroup->groupSettings()->localStorageQuotaBytes();
+    unsigned quota = pageGroup->groupSettings().localStorageQuotaBytes();
     RefPtr<StorageNamespaceImpl> localStorageNamespace = adoptRef(new StorageNamespaceImpl(LocalStorage, pageGroupID, quota));
 
     result.iterator->value = localStorageNamespace.get();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to