[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
jorlow at chromium.org
jorlow at chromium.org
Thu Oct 29 20:33:55 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit a9dca04de6844c217643de56be78e2034e4faac3
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 24 21:36:27 2009 +0000
2009-09-24 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Eric Seidel.
StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
https://bugs.webkit.org/show_bug.cgi?id=29290
Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
per http://webkit.org/coding/RefPtr.html
No behavior change, so no tests.
* storage/StorageNamespace.h:
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::storageArea):
* storage/StorageNamespaceImpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e63143c..4f145d5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-09-24 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
+ https://bugs.webkit.org/show_bug.cgi?id=29290
+
+ Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
+ per http://webkit.org/coding/RefPtr.html
+
+ No behavior change, so no tests.
+
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::storageArea):
+ * storage/StorageNamespaceImpl.h:
+
2009-09-24 Geoffrey Garen <ggaren at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 06a37c8..b992ee3 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -34,6 +34,8 @@
#include "CString.h"
#include "Chrome.h"
#include "Console.h"
+#include "Database.h"
+#include "DOMApplicationCache.h"
#include "DOMSelection.h"
#include "DOMTimer.h"
#include "PageTransitionEvent.h"
@@ -55,6 +57,7 @@
#include "Media.h"
#include "MessageEvent.h"
#include "Navigator.h"
+#include "NotificationCenter.h"
#include "Page.h"
#include "PageGroup.h"
#include "PlatformScreen.h"
@@ -62,29 +65,14 @@
#include "Screen.h"
#include "SecurityOrigin.h"
#include "Settings.h"
+#include "Storage.h"
+#include "StorageArea.h"
+#include "StorageNamespace.h"
#include "SuddenTermination.h"
#include "WebKitPoint.h"
#include <algorithm>
#include <wtf/MathExtras.h>
-#if ENABLE(DATABASE)
-#include "Database.h"
-#endif
-
-#if ENABLE(DOM_STORAGE)
-#include "Storage.h"
-#include "StorageArea.h"
-#include "StorageNamespace.h"
-#endif
-
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
-#include "DOMApplicationCache.h"
-#endif
-
-#if ENABLE(NOTIFICATIONS)
-#include "NotificationCenter.h"
-#endif
-
using std::min;
using std::max;
@@ -600,15 +588,12 @@ Storage* DOMWindow::localStorage() const
if (!page->settings()->localStorageEnabled())
return 0;
- StorageNamespace* localStorage = page->group().localStorage();
- RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(document->securityOrigin()) : 0;
- if (storageArea) {
+ RefPtr<StorageArea> storageArea = page->group().localStorage()->storageArea(document->securityOrigin());
#if ENABLE(INSPECTOR)
- page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m_frame);
+ page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m_frame);
#endif
- m_localStorage = Storage::create(m_frame, storageArea.release());
- }
+ m_localStorage = Storage::create(m_frame, storageArea.release());
return m_localStorage.get();
}
#endif
diff --git a/WebCore/storage/StorageAreaImpl.cpp b/WebCore/storage/StorageAreaImpl.cpp
index 0d69216..66447d3 100644
--- a/WebCore/storage/StorageAreaImpl.cpp
+++ b/WebCore/storage/StorageAreaImpl.cpp
@@ -47,6 +47,11 @@ StorageAreaImpl::~StorageAreaImpl()
{
}
+PassRefPtr<StorageAreaImpl> StorageAreaImpl::create(StorageType storageType, PassRefPtr<SecurityOrigin> origin, PassRefPtr<StorageSyncManager> syncManager)
+{
+ return adoptRef(new StorageAreaImpl(storageType, origin, syncManager));
+}
+
StorageAreaImpl::StorageAreaImpl(StorageType storageType, PassRefPtr<SecurityOrigin> origin, PassRefPtr<StorageSyncManager> syncManager)
: m_storageType(storageType)
, m_securityOrigin(origin)
diff --git a/WebCore/storage/StorageAreaImpl.h b/WebCore/storage/StorageAreaImpl.h
index b98482b..a7cc9f6 100644
--- a/WebCore/storage/StorageAreaImpl.h
+++ b/WebCore/storage/StorageAreaImpl.h
@@ -30,6 +30,7 @@
#include "StorageArea.h"
+#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
@@ -40,7 +41,7 @@ namespace WebCore {
class StorageAreaImpl : public StorageArea {
public:
- StorageAreaImpl(StorageType, PassRefPtr<SecurityOrigin>, PassRefPtr<StorageSyncManager>);
+ static PassRefPtr<StorageAreaImpl> create(StorageType, PassRefPtr<SecurityOrigin>, PassRefPtr<StorageSyncManager>);
virtual ~StorageAreaImpl();
// The HTML5 DOM Storage API (and contains)
@@ -60,6 +61,7 @@ namespace WebCore {
SecurityOrigin* securityOrigin();
private:
+ StorageAreaImpl(StorageType, PassRefPtr<SecurityOrigin>, PassRefPtr<StorageSyncManager>);
StorageAreaImpl(StorageAreaImpl*);
void blockUntilImportComplete() const;
diff --git a/WebCore/storage/StorageNamespace.h b/WebCore/storage/StorageNamespace.h
index 825581f..6866746 100644
--- a/WebCore/storage/StorageNamespace.h
+++ b/WebCore/storage/StorageNamespace.h
@@ -45,7 +45,7 @@ namespace WebCore {
static PassRefPtr<StorageNamespace> sessionStorageNamespace();
virtual ~StorageNamespace() { }
- virtual PassRefPtr<StorageArea> storageArea(SecurityOrigin*) = 0;
+ virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
virtual PassRefPtr<StorageNamespace> copy() = 0;
virtual void close() = 0;
virtual void unlock() = 0;
diff --git a/WebCore/storage/StorageNamespaceImpl.cpp b/WebCore/storage/StorageNamespaceImpl.cpp
index 5ac22cf..d5af31f 100644
--- a/WebCore/storage/StorageNamespaceImpl.cpp
+++ b/WebCore/storage/StorageNamespaceImpl.cpp
@@ -99,17 +99,18 @@ PassRefPtr<StorageNamespace> StorageNamespaceImpl::copy()
return adoptRef(newNamespace);
}
-PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(SecurityOrigin* origin)
+PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOrigin> prpOrigin)
{
ASSERT(isMainThread());
ASSERT(!m_isShutdown);
+ RefPtr<SecurityOrigin> origin = prpOrigin;
RefPtr<StorageAreaImpl> storageArea;
if (storageArea = m_storageAreaMap.get(origin))
return storageArea.release();
- storageArea = adoptRef(new StorageAreaImpl(m_storageType, origin, m_syncManager));
- m_storageAreaMap.set(origin, storageArea);
+ storageArea = StorageAreaImpl::create(m_storageType, origin, m_syncManager);
+ m_storageAreaMap.set(origin.release(), storageArea);
return storageArea.release();
}
diff --git a/WebCore/storage/StorageNamespaceImpl.h b/WebCore/storage/StorageNamespaceImpl.h
index d3ef37f..05a12ad 100644
--- a/WebCore/storage/StorageNamespaceImpl.h
+++ b/WebCore/storage/StorageNamespaceImpl.h
@@ -46,7 +46,7 @@ namespace WebCore {
static PassRefPtr<StorageNamespace> sessionStorageNamespace();
virtual ~StorageNamespaceImpl();
- virtual PassRefPtr<StorageArea> storageArea(SecurityOrigin*);
+ virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>);
virtual PassRefPtr<StorageNamespace> copy();
virtual void close();
virtual void unlock();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list