Title: [148692] trunk/Source/WebKit2
- Revision
- 148692
- Author
- ander...@apple.com
- Date
- 2013-04-18 11:34:21 -0700 (Thu, 18 Apr 2013)
Log Message
StorageAreaMaps should not assume that a zero storage namespace ID is used for local storage
https://bugs.webkit.org/show_bug.cgi?id=114822
Reviewed by Beth Dakin.
Store the storage type directly in the storage area map.
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
* WebProcess/Storage/StorageAreaMap.h:
(WebKit::StorageAreaMap::storageType):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (148691 => 148692)
--- trunk/Source/WebKit2/ChangeLog 2013-04-18 18:18:29 UTC (rev 148691)
+++ trunk/Source/WebKit2/ChangeLog 2013-04-18 18:34:21 UTC (rev 148692)
@@ -1,5 +1,19 @@
2013-04-18 Anders Carlsson <ander...@apple.com>
+ StorageAreaMaps should not assume that a zero storage namespace ID is used for local storage
+ https://bugs.webkit.org/show_bug.cgi?id=114822
+
+ Reviewed by Beth Dakin.
+
+ Store the storage type directly in the storage area map.
+
+ * WebProcess/Storage/StorageAreaMap.cpp:
+ (WebKit::StorageAreaMap::StorageAreaMap):
+ * WebProcess/Storage/StorageAreaMap.h:
+ (WebKit::StorageAreaMap::storageType):
+
+2013-04-18 Anders Carlsson <ander...@apple.com>
+
Begin fleshing out UI side local storage
https://bugs.webkit.org/show_bug.cgi?id=114820
Modified: trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp (148691 => 148692)
--- trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp 2013-04-18 18:18:29 UTC (rev 148691)
+++ trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp 2013-04-18 18:34:21 UTC (rev 148692)
@@ -57,6 +57,7 @@
StorageAreaMap::StorageAreaMap(StorageNamespaceImpl* storageNamespace, PassRefPtr<WebCore::SecurityOrigin> securityOrigin)
: m_storageMapID(generateStorageMapID())
+ , m_storageType(storageNamespace->storageType())
, m_storageNamespaceID(storageNamespace->storageNamespaceID())
, m_quotaInBytes(storageNamespace->quotaInBytes())
, m_securityOrigin(securityOrigin)
@@ -71,15 +72,6 @@
WebProcess::shared().removeMessageReceiver(Messages::StorageAreaMap::messageReceiverName(), m_storageMapID);
}
-StorageType StorageAreaMap::storageType() const
-{
- // A zero storage namespace ID is used for local storage.
- if (!m_storageNamespaceID)
- return LocalStorage;
-
- return SessionStorage;
-}
-
unsigned StorageAreaMap::length()
{
loadValuesIfNeeded();
Modified: trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.h (148691 => 148692)
--- trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.h 2013-04-18 18:18:29 UTC (rev 148691)
+++ trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.h 2013-04-18 18:34:21 UTC (rev 148692)
@@ -49,7 +49,7 @@
static PassRefPtr<StorageAreaMap> create(StorageNamespaceImpl*, PassRefPtr<WebCore::SecurityOrigin>);
~StorageAreaMap();
- WebCore::StorageType storageType() const;
+ WebCore::StorageType storageType() const { return m_storageType; }
unsigned length();
String key(unsigned index);
@@ -78,6 +78,8 @@
void dispatchLocalStorageEvent(uint64_t sourceStorageAreaID, const String& key, const String& oldValue, const String& newValue, const String& urlString);
uint64_t m_storageMapID;
+
+ WebCore::StorageType m_storageType;
uint64_t m_storageNamespaceID;
unsigned m_quotaInBytes;
RefPtr<WebCore::SecurityOrigin> m_securityOrigin;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes