Title: [256495] branches/safari-609-branch/Source
Revision
256495
Author
[email protected]
Date
2020-02-12 17:38:20 -0800 (Wed, 12 Feb 2020)

Log Message

Cherry-pick r254859. rdar://problem/59298172

    Minor improvements to StorageAreaMap
    https://bugs.webkit.org/show_bug.cgi?id=206433

    Reviewed by Darin Adler.

    Source/WebCore:

    Use inline initialization for some of StorageMap's data member.
    Also specify uint8_t as underlying type of StorageType enum class for better packing.

    * inspector/InspectorInstrumentation.h:
    * storage/StorageArea.h:
    * storage/StorageMap.cpp:
    (WebCore::StorageMap::StorageMap):
    * storage/StorageMap.h:
    * storage/StorageType.h:

    Source/WebKit:

    Minor improvements to StorageAreaMap:
    1. The class does not need to be RefCounted, as it is solely owned by StorageNamespaceImpl. Having it
       RefCounted was actually dangerous because StorageAreaMap had a raw pointer data member to its owner:
       m_storageNamespace. This raw pointer could become stale if you extend the lifetime of the StorageAreaMap
       object to outlive its StorageNamespaceImpl.
    2. Make StorageAreaMap::connect() private as it is never called from outside the class
    3. Reorder data members for better packing
    4. Use modern loops in the implementation
    5. Rename loadValuesIfNeeded() to ensureStorageMap() and have it return the StorageMap object. This makes
       calls site more concise and it makes it clearer when this method needs to be called.
    6. Mark class as final
    7. Replace LOG_ERROR() with RELEASE_LOG_ERROR() so that we can see error logging in sysdiagnoses
    8. Use more references instead of raw pointers to make it clear when null checks are not needed

    * WebProcess/WebStorage/StorageAreaImpl.cpp:
    (WebKit::StorageAreaImpl::create):
    (WebKit::StorageAreaImpl::StorageAreaImpl):
    * WebProcess/WebStorage/StorageAreaImpl.h:
    * WebProcess/WebStorage/StorageAreaMap.cpp:
    (WebKit::StorageAreaMap::StorageAreaMap):
    (WebKit::StorageAreaMap::length):
    (WebKit::StorageAreaMap::key):
    (WebKit::StorageAreaMap::item):
    (WebKit::StorageAreaMap::setItem):
    (WebKit::StorageAreaMap::removeItem):
    (WebKit::StorageAreaMap::clear):
    (WebKit::StorageAreaMap::contains):
    (WebKit::StorageAreaMap::resetValues):
    (WebKit::StorageAreaMap::ensureStorageMap):
    (WebKit::StorageAreaMap::applyChange):
    (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
    (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
    (WebKit::StorageAreaMap::connect):
    (WebKit::StorageAreaMap::disconnect):
    * WebProcess/WebStorage/StorageAreaMap.h:
    * WebProcess/WebStorage/StorageAreaMap.messages.in:
    * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
    (WebKit::StorageNamespaceImpl::storageArea):
    * WebProcess/WebStorage/StorageNamespaceImpl.h:

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

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (256494 => 256495)


--- branches/safari-609-branch/Source/WebCore/ChangeLog	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog	2020-02-13 01:38:20 UTC (rev 256495)
@@ -1,5 +1,87 @@
 2020-02-12  Alan Coon  <[email protected]>
 
+        Cherry-pick r254859. rdar://problem/59298172
+
+    Minor improvements to StorageAreaMap
+    https://bugs.webkit.org/show_bug.cgi?id=206433
+    
+    Reviewed by Darin Adler.
+    
+    Source/WebCore:
+    
+    Use inline initialization for some of StorageMap's data member.
+    Also specify uint8_t as underlying type of StorageType enum class for better packing.
+    
+    * inspector/InspectorInstrumentation.h:
+    * storage/StorageArea.h:
+    * storage/StorageMap.cpp:
+    (WebCore::StorageMap::StorageMap):
+    * storage/StorageMap.h:
+    * storage/StorageType.h:
+    
+    Source/WebKit:
+    
+    Minor improvements to StorageAreaMap:
+    1. The class does not need to be RefCounted, as it is solely owned by StorageNamespaceImpl. Having it
+       RefCounted was actually dangerous because StorageAreaMap had a raw pointer data member to its owner:
+       m_storageNamespace. This raw pointer could become stale if you extend the lifetime of the StorageAreaMap
+       object to outlive its StorageNamespaceImpl.
+    2. Make StorageAreaMap::connect() private as it is never called from outside the class
+    3. Reorder data members for better packing
+    4. Use modern loops in the implementation
+    5. Rename loadValuesIfNeeded() to ensureStorageMap() and have it return the StorageMap object. This makes
+       calls site more concise and it makes it clearer when this method needs to be called.
+    6. Mark class as final
+    7. Replace LOG_ERROR() with RELEASE_LOG_ERROR() so that we can see error logging in sysdiagnoses
+    8. Use more references instead of raw pointers to make it clear when null checks are not needed
+    
+    * WebProcess/WebStorage/StorageAreaImpl.cpp:
+    (WebKit::StorageAreaImpl::create):
+    (WebKit::StorageAreaImpl::StorageAreaImpl):
+    * WebProcess/WebStorage/StorageAreaImpl.h:
+    * WebProcess/WebStorage/StorageAreaMap.cpp:
+    (WebKit::StorageAreaMap::StorageAreaMap):
+    (WebKit::StorageAreaMap::length):
+    (WebKit::StorageAreaMap::key):
+    (WebKit::StorageAreaMap::item):
+    (WebKit::StorageAreaMap::setItem):
+    (WebKit::StorageAreaMap::removeItem):
+    (WebKit::StorageAreaMap::clear):
+    (WebKit::StorageAreaMap::contains):
+    (WebKit::StorageAreaMap::resetValues):
+    (WebKit::StorageAreaMap::ensureStorageMap):
+    (WebKit::StorageAreaMap::applyChange):
+    (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
+    (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
+    (WebKit::StorageAreaMap::connect):
+    (WebKit::StorageAreaMap::disconnect):
+    * WebProcess/WebStorage/StorageAreaMap.h:
+    * WebProcess/WebStorage/StorageAreaMap.messages.in:
+    * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
+    (WebKit::StorageNamespaceImpl::storageArea):
+    * WebProcess/WebStorage/StorageNamespaceImpl.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-01-21  Chris Dumez  <[email protected]>
+
+            Minor improvements to StorageAreaMap
+            https://bugs.webkit.org/show_bug.cgi?id=206433
+
+            Reviewed by Darin Adler.
+
+            Use inline initialization for some of StorageMap's data member.
+            Also specify uint8_t as underlying type of StorageType enum class for better packing.
+
+            * inspector/InspectorInstrumentation.h:
+            * storage/StorageArea.h:
+            * storage/StorageMap.cpp:
+            (WebCore::StorageMap::StorageMap):
+            * storage/StorageMap.h:
+            * storage/StorageType.h:
+
+2020-02-12  Alan Coon  <[email protected]>
+
         Revert r256409. rdar://problem/59298138
 
 2020-02-12  Alan Coon  <[email protected]>

Modified: branches/safari-609-branch/Source/WebCore/inspector/InspectorInstrumentation.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebCore/inspector/InspectorInstrumentation.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebCore/inspector/InspectorInstrumentation.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -108,7 +108,7 @@
 class WebGPUSwapChain;
 #endif
 
-enum class StorageType;
+enum class StorageType : uint8_t;
 
 struct ComputedEffectTiming;
 struct WebSocketFrame;

Modified: branches/safari-609-branch/Source/WebCore/page/Page.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebCore/page/Page.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebCore/page/Page.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -713,7 +713,7 @@
     DeviceOrientationUpdateProvider* deviceOrientationUpdateProvider() const { return m_deviceOrientationUpdateProvider.get(); }
 #endif
 
-    void forEachDocument(const WTF::Function<void(Document&)>&) const;
+    WEBCORE_EXPORT void forEachDocument(const WTF::Function<void(Document&)>&) const;
     void forEachMediaElement(const WTF::Function<void(HTMLMediaElement&)>&);
 
     bool shouldDisableCorsForRequestTo(const URL&) const;

Modified: branches/safari-609-branch/Source/WebCore/storage/StorageArea.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebCore/storage/StorageArea.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebCore/storage/StorageArea.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -35,7 +35,7 @@
 class SecurityOrigin;
 class StorageSyncManager;
 
-enum class StorageType;
+enum class StorageType : uint8_t;
 
 struct SecurityOriginData;
 

Modified: branches/safari-609-branch/Source/WebCore/storage/StorageMap.cpp (256494 => 256495)


--- branches/safari-609-branch/Source/WebCore/storage/StorageMap.cpp	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebCore/storage/StorageMap.cpp	2020-02-13 01:38:20 UTC (rev 256495)
@@ -37,9 +37,7 @@
 
 StorageMap::StorageMap(unsigned quota)
     : m_iterator(m_map.end())
-    , m_iteratorIndex(UINT_MAX)
     , m_quotaSize(quota)  // quota measured in bytes
-    , m_currentLength(0)
 {
 }
 

Modified: branches/safari-609-branch/Source/WebCore/storage/StorageMap.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebCore/storage/StorageMap.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebCore/storage/StorageMap.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -62,10 +62,10 @@
 
     HashMap<String, String> m_map;
     HashMap<String, String>::iterator m_iterator;
-    unsigned m_iteratorIndex;
+    unsigned m_iteratorIndex { std::numeric_limits<unsigned>::max() };
 
     unsigned m_quotaSize; // Measured in bytes.
-    unsigned m_currentLength; // Measured in UChars.
+    unsigned m_currentLength { 0 }; // Measured in UChars.
 };
 
 } // namespace WebCore

Modified: branches/safari-609-branch/Source/WebCore/storage/StorageType.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebCore/storage/StorageType.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebCore/storage/StorageType.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -27,7 +27,7 @@
 
 namespace WebCore {
 
-enum class StorageType {
+enum class StorageType : uint8_t {
     Session,
     Local,
     TransientLocal,

Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/ChangeLog	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog	2020-02-13 01:38:20 UTC (rev 256495)
@@ -1,3 +1,115 @@
+2020-02-12  Alan Coon  <[email protected]>
+
+        Cherry-pick r254859. rdar://problem/59298172
+
+    Minor improvements to StorageAreaMap
+    https://bugs.webkit.org/show_bug.cgi?id=206433
+    
+    Reviewed by Darin Adler.
+    
+    Source/WebCore:
+    
+    Use inline initialization for some of StorageMap's data member.
+    Also specify uint8_t as underlying type of StorageType enum class for better packing.
+    
+    * inspector/InspectorInstrumentation.h:
+    * storage/StorageArea.h:
+    * storage/StorageMap.cpp:
+    (WebCore::StorageMap::StorageMap):
+    * storage/StorageMap.h:
+    * storage/StorageType.h:
+    
+    Source/WebKit:
+    
+    Minor improvements to StorageAreaMap:
+    1. The class does not need to be RefCounted, as it is solely owned by StorageNamespaceImpl. Having it
+       RefCounted was actually dangerous because StorageAreaMap had a raw pointer data member to its owner:
+       m_storageNamespace. This raw pointer could become stale if you extend the lifetime of the StorageAreaMap
+       object to outlive its StorageNamespaceImpl.
+    2. Make StorageAreaMap::connect() private as it is never called from outside the class
+    3. Reorder data members for better packing
+    4. Use modern loops in the implementation
+    5. Rename loadValuesIfNeeded() to ensureStorageMap() and have it return the StorageMap object. This makes
+       calls site more concise and it makes it clearer when this method needs to be called.
+    6. Mark class as final
+    7. Replace LOG_ERROR() with RELEASE_LOG_ERROR() so that we can see error logging in sysdiagnoses
+    8. Use more references instead of raw pointers to make it clear when null checks are not needed
+    
+    * WebProcess/WebStorage/StorageAreaImpl.cpp:
+    (WebKit::StorageAreaImpl::create):
+    (WebKit::StorageAreaImpl::StorageAreaImpl):
+    * WebProcess/WebStorage/StorageAreaImpl.h:
+    * WebProcess/WebStorage/StorageAreaMap.cpp:
+    (WebKit::StorageAreaMap::StorageAreaMap):
+    (WebKit::StorageAreaMap::length):
+    (WebKit::StorageAreaMap::key):
+    (WebKit::StorageAreaMap::item):
+    (WebKit::StorageAreaMap::setItem):
+    (WebKit::StorageAreaMap::removeItem):
+    (WebKit::StorageAreaMap::clear):
+    (WebKit::StorageAreaMap::contains):
+    (WebKit::StorageAreaMap::resetValues):
+    (WebKit::StorageAreaMap::ensureStorageMap):
+    (WebKit::StorageAreaMap::applyChange):
+    (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
+    (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
+    (WebKit::StorageAreaMap::connect):
+    (WebKit::StorageAreaMap::disconnect):
+    * WebProcess/WebStorage/StorageAreaMap.h:
+    * WebProcess/WebStorage/StorageAreaMap.messages.in:
+    * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
+    (WebKit::StorageNamespaceImpl::storageArea):
+    * WebProcess/WebStorage/StorageNamespaceImpl.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-01-21  Chris Dumez  <[email protected]>
+
+            Minor improvements to StorageAreaMap
+            https://bugs.webkit.org/show_bug.cgi?id=206433
+
+            Reviewed by Darin Adler.
+
+            Minor improvements to StorageAreaMap:
+            1. The class does not need to be RefCounted, as it is solely owned by StorageNamespaceImpl. Having it
+               RefCounted was actually dangerous because StorageAreaMap had a raw pointer data member to its owner:
+               m_storageNamespace. This raw pointer could become stale if you extend the lifetime of the StorageAreaMap
+               object to outlive its StorageNamespaceImpl.
+            2. Make StorageAreaMap::connect() private as it is never called from outside the class
+            3. Reorder data members for better packing
+            4. Use modern loops in the implementation
+            5. Rename loadValuesIfNeeded() to ensureStorageMap() and have it return the StorageMap object. This makes
+               calls site more concise and it makes it clearer when this method needs to be called.
+            6. Mark class as final
+            7. Replace LOG_ERROR() with RELEASE_LOG_ERROR() so that we can see error logging in sysdiagnoses
+            8. Use more references instead of raw pointers to make it clear when null checks are not needed
+
+            * WebProcess/WebStorage/StorageAreaImpl.cpp:
+            (WebKit::StorageAreaImpl::create):
+            (WebKit::StorageAreaImpl::StorageAreaImpl):
+            * WebProcess/WebStorage/StorageAreaImpl.h:
+            * WebProcess/WebStorage/StorageAreaMap.cpp:
+            (WebKit::StorageAreaMap::StorageAreaMap):
+            (WebKit::StorageAreaMap::length):
+            (WebKit::StorageAreaMap::key):
+            (WebKit::StorageAreaMap::item):
+            (WebKit::StorageAreaMap::setItem):
+            (WebKit::StorageAreaMap::removeItem):
+            (WebKit::StorageAreaMap::clear):
+            (WebKit::StorageAreaMap::contains):
+            (WebKit::StorageAreaMap::resetValues):
+            (WebKit::StorageAreaMap::ensureStorageMap):
+            (WebKit::StorageAreaMap::applyChange):
+            (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
+            (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
+            (WebKit::StorageAreaMap::connect):
+            (WebKit::StorageAreaMap::disconnect):
+            * WebProcess/WebStorage/StorageAreaMap.h:
+            * WebProcess/WebStorage/StorageAreaMap.messages.in:
+            * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
+            (WebKit::StorageNamespaceImpl::storageArea):
+            * WebProcess/WebStorage/StorageNamespaceImpl.h:
+
 2020-02-11  Alan Coon  <[email protected]>
 
         Cherry-pick r256073. rdar://problem/59299148

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.cpp (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.cpp	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.cpp	2020-02-13 01:38:20 UTC (rev 256495)
@@ -37,14 +37,14 @@
 namespace WebKit {
 using namespace WebCore;
 
-Ref<StorageAreaImpl> StorageAreaImpl::create(Ref<StorageAreaMap>&& storageAreaMap)
+Ref<StorageAreaImpl> StorageAreaImpl::create(StorageAreaMap& storageAreaMap)
 {
-    return adoptRef(*new StorageAreaImpl(WTFMove(storageAreaMap)));
+    return adoptRef(*new StorageAreaImpl(storageAreaMap));
 }
 
-StorageAreaImpl::StorageAreaImpl(Ref<StorageAreaMap>&& storageAreaMap)
+StorageAreaImpl::StorageAreaImpl(StorageAreaMap& storageAreaMap)
     : m_identifier(Identifier::generate())
-    , m_storageAreaMap(makeWeakPtr(storageAreaMap.get()))
+    , m_storageAreaMap(makeWeakPtr(storageAreaMap))
 {
     storageAreaMap->incrementUseCount();
 }
@@ -101,7 +101,7 @@
 StorageType StorageAreaImpl::storageType() const
 {
     if (m_storageAreaMap)
-        return m_storageAreaMap->storageType();
+        return m_storageAreaMap->type();
 
     // We probably need an Invalid type.
     return StorageType::Local;

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaImpl.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -43,13 +43,13 @@
 public:
     using Identifier = StorageAreaImplIdentifier;
 
-    static Ref<StorageAreaImpl> create(Ref<StorageAreaMap>&&);
+    static Ref<StorageAreaImpl> create(StorageAreaMap&);
     virtual ~StorageAreaImpl();
 
     Identifier identifier() const { return m_identifier; }
 
 private:
-    StorageAreaImpl(Ref<StorageAreaMap>&&);
+    StorageAreaImpl(StorageAreaMap&);
 
     // WebCore::StorageArea.
     unsigned length() override;

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp	2020-02-13 01:38:20 UTC (rev 256495)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "StorageAreaMap.h"
 
+#include "Logging.h"
 #include "NetworkProcessConnection.h"
 #include "StorageAreaImpl.h"
 #include "StorageAreaMapMessages.h"
@@ -48,18 +49,11 @@
 namespace WebKit {
 using namespace WebCore;
 
-Ref<StorageAreaMap> StorageAreaMap::create(StorageNamespaceImpl* storageNamespace, Ref<WebCore::SecurityOrigin>&& securityOrigin)
-{
-    return adoptRef(*new StorageAreaMap(storageNamespace, WTFMove(securityOrigin)));
-}
-
-StorageAreaMap::StorageAreaMap(StorageNamespaceImpl* storageNamespace, Ref<WebCore::SecurityOrigin>&& securityOrigin)
-    : m_storageNamespace(storageNamespace)
-    , m_storageType(storageNamespace->storageType())
-    , m_quotaInBytes(storageNamespace->quotaInBytes())
+StorageAreaMap::StorageAreaMap(StorageNamespaceImpl& storageNamespace, Ref<WebCore::SecurityOrigin>&& securityOrigin)
+    : m_namespace(storageNamespace)
     , m_securityOrigin(WTFMove(securityOrigin))
-    , m_currentSeed(0)
-    , m_hasPendingClear(false)
+    , m_quotaInBytes(storageNamespace.quotaInBytes())
+    , m_type(storageNamespace.storageType())
 {
     connect();
 }
@@ -71,34 +65,27 @@
 
 unsigned StorageAreaMap::length()
 {
-    loadValuesIfNeeded();
-
-    return m_storageMap->length();
+    return ensureMap().length();
 }
 
 String StorageAreaMap::key(unsigned index)
 {
-    loadValuesIfNeeded();
-
-    return m_storageMap->key(index);
+    return ensureMap().key(index);
 }
 
 String StorageAreaMap::item(const String& key)
 {
-    loadValuesIfNeeded();
-
-    return m_storageMap->getItem(key);
+    return ensureMap().getItem(key);
 }
 
 void StorageAreaMap::setItem(Frame* sourceFrame, StorageAreaImpl* sourceArea, const String& key, const String& value, bool& quotaException)
 {
-    loadValuesIfNeeded();
+    auto& map = ensureMap();
+    ASSERT(map.hasOneRef());
 
-    ASSERT(m_storageMap->hasOneRef());
-
     String oldValue;
     quotaException = false;
-    m_storageMap->setItem(key, value, oldValue, quotaException);
+    map.setItem(key, value, oldValue, quotaException);
     if (quotaException)
         return;
 
@@ -107,19 +94,19 @@
 
     m_pendingValueChanges.add(key);
 
-    if (m_storageMapID)
-        WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::StorageManagerSet::SetItem(*m_storageMapID, sourceArea->identifier(), m_currentSeed, key, value, sourceFrame->document()->url()), 0);
+    if (m_mapID)
+        WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::StorageManagerSet::SetItem(*m_mapID, sourceArea->identifier(), m_currentSeed, key, value, sourceFrame->document()->url()), 0);
     else
-        LOG_ERROR("StorageAreaMap::setItem fails because storage map ID is invalid");
+        RELEASE_LOG_ERROR(Storage, "StorageAreaMap::setItem failed because storage map ID is invalid");
 }
 
 void StorageAreaMap::removeItem(WebCore::Frame* sourceFrame, StorageAreaImpl* sourceArea, const String& key)
 {
-    loadValuesIfNeeded();
-    ASSERT(m_storageMap->hasOneRef());
+    auto& map = ensureMap();
+    ASSERT(map.hasOneRef());
 
     String oldValue;
-    m_storageMap->removeItem(key, oldValue);
+    map.removeItem(key, oldValue);
 
     if (oldValue.isNull())
         return;
@@ -126,10 +113,10 @@
 
     m_pendingValueChanges.add(key);
 
-    if (m_storageMapID)
-        WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::StorageManagerSet::RemoveItem(*m_storageMapID, sourceArea->identifier(), m_currentSeed, key, sourceFrame->document()->url()), 0);
+    if (m_mapID)
+        WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::StorageManagerSet::RemoveItem(*m_mapID, sourceArea->identifier(), m_currentSeed, key, sourceFrame->document()->url()), 0);
     else
-        LOG_ERROR("StorageAreaMap::removeItem fails because storage map ID is invalid");
+        RELEASE_LOG_ERROR(Storage, "StorageAreaMap::removeItem failed because storage map ID is invalid");
 }
 
 void StorageAreaMap::clear(WebCore::Frame* sourceFrame, StorageAreaImpl* sourceArea)
@@ -139,54 +126,51 @@
     resetValues();
 
     m_hasPendingClear = true;
-    m_storageMap = StorageMap::create(m_quotaInBytes);
+    m_map = StorageMap::create(m_quotaInBytes);
 
-    if (m_storageMapID)
-        WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::StorageManagerSet::Clear(*m_storageMapID, sourceArea->identifier(), m_currentSeed, sourceFrame->document()->url()), 0);
+    if (m_mapID)
+        WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::StorageManagerSet::Clear(*m_mapID, sourceArea->identifier(), m_currentSeed, sourceFrame->document()->url()), 0);
     else
-        LOG_ERROR("StorageAreaMap::removeItem fails because storage map ID is invalid");
+        RELEASE_LOG_ERROR(Storage, "StorageAreaMap::clear failed because storage map ID is invalid");
 }
 
 bool StorageAreaMap::contains(const String& key)
 {
-    loadValuesIfNeeded();
-
-    return m_storageMap->contains(key);
+    return ensureMap().contains(key);
 }
 
 void StorageAreaMap::resetValues()
 {
-    m_storageMap = nullptr;
+    m_map = nullptr;
 
     m_pendingValueChanges.clear();
     m_hasPendingClear = false;
-    m_currentSeed++;
+    ++m_currentSeed;
 }
 
-void StorageAreaMap::loadValuesIfNeeded()
+StorageMap& StorageAreaMap::ensureMap()
 {
     connect();
 
-    if (m_storageMap)
-        return;
+    if (!m_map) {
+        m_map = StorageMap::create(m_quotaInBytes);
 
-    HashMap<String, String> values;
-
-    if (m_storageMapID) {
-        // The StorageManagerSet::GetValues() IPC may be very slow because it may need to fetch the values from disk and there may be a lot
-        // of data.
-        IPC::UnboundedSynchronousIPCScope unboundedSynchronousIPCScope;
-        WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::GetValues(*m_storageMapID), Messages::StorageManagerSet::GetValues::Reply(values), 0);
-    } else
-        LOG_ERROR("StorageAreaMap::loadValuesIfNeeded fails to load from network process because storage map ID is invalid");
-
-    m_storageMap = StorageMap::create(m_quotaInBytes);
-    m_storageMap->importItems(WTFMove(values));
+        if (m_mapID) {
+            // We need to use a IPC::UnboundedSynchronousIPCScope to prevent UIProcess hangs in case we receive a synchronous IPC from the UIProcess while we're waiting for a response
+            // from our StorageManagerSet::GetValues() IPC. This IPC may be very slow because it may need to fetch the values from disk and there may be a lot of data.
+            IPC::UnboundedSynchronousIPCScope unboundedSynchronousIPCScope;
+            HashMap<String, String> values;
+            WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::GetValues(*m_mapID), Messages::StorageManagerSet::GetValues::Reply(values), 0);
+            m_map->importItems(WTFMove(values));
+        } else
+            RELEASE_LOG_ERROR(Storage, "StorageAreaMap::ensureMap failed to load from network process because storage map ID is invalid");
+    }
+    return *m_map;
 }
 
-void StorageAreaMap::didSetItem(uint64_t storageMapSeed, const String& key, bool quotaError)
+void StorageAreaMap::didSetItem(uint64_t mapSeed, const String& key, bool quotaError)
 {
-    if (m_currentSeed != storageMapSeed)
+    if (m_currentSeed != mapSeed)
         return;
 
     ASSERT(m_pendingValueChanges.contains(key));
@@ -199,9 +183,9 @@
     m_pendingValueChanges.remove(key);
 }
 
-void StorageAreaMap::didRemoveItem(uint64_t storageMapSeed, const String& key)
+void StorageAreaMap::didRemoveItem(uint64_t mapSeed, const String& key)
 {
-    if (m_currentSeed != storageMapSeed)
+    if (m_currentSeed != mapSeed)
         return;
 
     ASSERT(m_pendingValueChanges.contains(key));
@@ -208,9 +192,9 @@
     m_pendingValueChanges.remove(key);
 }
 
-void StorageAreaMap::didClear(uint64_t storageMapSeed)
+void StorageAreaMap::didClear(uint64_t mapSeed)
 {
-    if (m_currentSeed != storageMapSeed)
+    if (m_currentSeed != mapSeed)
         return;
 
     ASSERT(m_hasPendingClear);
@@ -220,7 +204,7 @@
 bool StorageAreaMap::shouldApplyChangeForKey(const String& key) const
 {
     // We have not yet loaded anything from this storage map.
-    if (!m_storageMap)
+    if (!m_map)
         return false;
 
     // Check if this storage area is currently waiting for the storage manager to update the given key.
@@ -234,7 +218,7 @@
 
 void StorageAreaMap::applyChange(const String& key, const String& newValue)
 {
-    ASSERT(!m_storageMap || m_storageMap->hasOneRef());
+    ASSERT(!m_map || m_map->hasOneRef());
 
     // There is at least one clear pending we don't want to apply any changes until we get the corresponding DidClear messages.
     if (m_hasPendingClear)
@@ -242,13 +226,12 @@
 
     if (!key) {
         // A null key means clear.
-        auto newStorageMap = StorageMap::create(m_quotaInBytes);
+        auto newMap = StorageMap::create(m_quotaInBytes);
 
         // Any changes that were made locally after the clear must still be kept around in the new map.
-        for (auto it = m_pendingValueChanges.begin().keys(), end = m_pendingValueChanges.end().keys(); it != end; ++it) {
-            const String& key = *it;
-
-            String value = m_storageMap->getItem(key);
+        for (auto& change : m_pendingValueChanges) {
+            auto& key = change.key;
+            String value = m_map->getItem(key);
             if (!value) {
                 // This change must have been a pending remove, ignore it.
                 continue;
@@ -255,10 +238,10 @@
             }
 
             String oldValue;
-            newStorageMap->setItemIgnoringQuota(key, oldValue);
+            newMap->setItemIgnoringQuota(key, oldValue);
         }
 
-        m_storageMap = WTFMove(newStorageMap);
+        m_map = WTFMove(newMap);
         return;
     }
 
@@ -268,11 +251,11 @@
     if (!newValue) {
         // A null new value means that the item should be removed.
         String oldValue;
-        m_storageMap->removeItem(key, oldValue);
+        m_map->removeItem(key, oldValue);
         return;
     }
 
-    m_storageMap->setItemIgnoringQuota(key, newValue);
+    m_map->setItemIgnoringQuota(key, newValue);
 }
 
 void StorageAreaMap::dispatchStorageEvent(const Optional<StorageAreaImplIdentifier>& storageAreaImplID, const String& key, const String& oldValue, const String& newValue, const String& urlString)
@@ -282,7 +265,7 @@
         applyChange(key, newValue);
     }
 
-    if (storageType() == StorageType::Session)
+    if (type() == StorageType::Session)
         dispatchSessionStorageEvent(storageAreaImplID, key, oldValue, newValue, urlString);
     else
         dispatchLocalStorageEvent(storageAreaImplID, key, oldValue, newValue, urlString);
@@ -293,103 +276,92 @@
     resetValues();
 }
 
+static Vector<RefPtr<Frame>> framesForEventDispatching(Page& page, SecurityOrigin& origin, const Optional<StorageAreaImplIdentifier>& storageAreaImplID)
+{
+    Vector<RefPtr<Frame>> frames;
+    page.forEachDocument([&](auto& document) {
+        if (!document.securityOrigin().equal(&origin))
+            return;
+        
+        auto* storage = document.domWindow() ? document.domWindow()->optionalSessionStorage() : nullptr;
+        if (!storage)
+            return;
+        
+        auto& storageArea = static_cast<StorageAreaImpl&>(storage->area());
+        if (storageArea.identifier() == storageAreaImplID) {
+            // This is the storage area that caused the event to be dispatched.
+            return;
+        }
+       
+        if (auto* frame = document.frame()) 
+            frames.append(frame);
+    });
+    return frames;
+}
+
 void StorageAreaMap::dispatchSessionStorageEvent(const Optional<StorageAreaImplIdentifier>& storageAreaImplID, const String& key, const String& oldValue, const String& newValue, const String& urlString)
 {
     // Namespace IDs for session storage namespaces are equivalent to web page IDs
     // so we can get the right page here.
-    WebPage* webPage = WebProcess::singleton().webPage(m_storageNamespace->sessionStoragePageID());
+    auto* webPage = WebProcess::singleton().webPage(m_namespace.sessionStoragePageID());
     if (!webPage)
         return;
 
-    Vector<RefPtr<Frame>> frames;
+    auto* page = webPage->corePage();
+    if (!page)
+        return;
 
-    Page* page = webPage->corePage();
-    for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
-        Document* document = frame->document();
-        if (!document->securityOrigin().equal(m_securityOrigin.ptr()))
-            continue;
-
-        Storage* storage = document->domWindow()->optionalSessionStorage();
-        if (!storage)
-            continue;
-
-        StorageAreaImpl& storageArea = static_cast<StorageAreaImpl&>(storage->area());
-        if (storageArea.identifier() == storageAreaImplID) {
-            // This is the storage area that caused the event to be dispatched.
-            continue;
-        }
-
-        frames.append(frame);
-    }
-
+    auto frames = framesForEventDispatching(*page, m_securityOrigin, storageAreaImplID);
     StorageEventDispatcher::dispatchSessionStorageEventsToFrames(*page, frames, key, oldValue, newValue, urlString, m_securityOrigin->data());
 }
 
 void StorageAreaMap::dispatchLocalStorageEvent(const Optional<StorageAreaImplIdentifier>& storageAreaImplID, const String& key, const String& oldValue, const String& newValue, const String& urlString)
 {
-    ASSERT(isLocalStorage(storageType()));
+    ASSERT(isLocalStorage(type()));
 
     Vector<RefPtr<Frame>> frames;
 
     // Namespace IDs for local storage namespaces are equivalent to web page group IDs.
-    PageGroup& pageGroup = *WebProcess::singleton().webPageGroup(m_storageNamespace->pageGroupID())->corePageGroup();
-    const HashSet<Page*>& pages = pageGroup.pages();
-    for (HashSet<Page*>::const_iterator it = pages.begin(), end = pages.end(); it != end; ++it) {
-        for (Frame* frame = &(*it)->mainFrame(); frame; frame = frame->tree().traverseNext()) {
-            Document* document = frame->document();
-            if (!document->securityOrigin().equal(m_securityOrigin.ptr()))
-                continue;
+    auto& pageGroup = *WebProcess::singleton().webPageGroup(m_namespace.pageGroupID())->corePageGroup();
+    for (auto* page : pageGroup.pages())
+        frames.appendVector(framesForEventDispatching(*page, m_securityOrigin, storageAreaImplID));
 
-            Storage* storage = document->domWindow()->optionalLocalStorage();
-            if (!storage)
-                continue;
-
-            StorageAreaImpl& storageArea = static_cast<StorageAreaImpl&>(storage->area());
-            if (storageArea.identifier() == storageAreaImplID) {
-                // This is the storage area that caused the event to be dispatched.
-                continue;
-            }
-
-            frames.append(frame);
-        }
-    }
-
     StorageEventDispatcher::dispatchLocalStorageEventsToFrames(pageGroup, frames, key, oldValue, newValue, urlString, m_securityOrigin->data());
 }
 
 void StorageAreaMap::connect()
 {
-    if (m_storageMapID)
+    if (m_mapID)
         return;
 
-    switch (m_storageType) {
+    switch (m_type) {
     case StorageType::Local:
     case StorageType::TransientLocal:
-        if (SecurityOrigin* topLevelOrigin = m_storageNamespace->topLevelOrigin())
-            WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::ConnectToTransientLocalStorageArea(WebProcess::singleton().sessionID(), m_storageNamespace->storageNamespaceID(), topLevelOrigin->data(), m_securityOrigin->data()), Messages::StorageManagerSet::ConnectToTransientLocalStorageArea::Reply(m_storageMapID), 0);
+        if (SecurityOrigin* topLevelOrigin = m_namespace.topLevelOrigin())
+            WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::ConnectToTransientLocalStorageArea(WebProcess::singleton().sessionID(), m_namespace.storageNamespaceID(), topLevelOrigin->data(), m_securityOrigin->data()), Messages::StorageManagerSet::ConnectToTransientLocalStorageArea::Reply(m_mapID), 0);
         else
-            WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::ConnectToLocalStorageArea(WebProcess::singleton().sessionID(), m_storageNamespace->storageNamespaceID(), m_securityOrigin->data()), Messages::StorageManagerSet::ConnectToLocalStorageArea::Reply(m_storageMapID), 0);
+            WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::ConnectToLocalStorageArea(WebProcess::singleton().sessionID(), m_namespace.storageNamespaceID(), m_securityOrigin->data()), Messages::StorageManagerSet::ConnectToLocalStorageArea::Reply(m_mapID), 0);
         break;
     case StorageType::Session:
-        WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::ConnectToSessionStorageArea(WebProcess::singleton().sessionID(), m_storageNamespace->storageNamespaceID(), m_securityOrigin->data()), Messages::StorageManagerSet::ConnectToSessionStorageArea::Reply(m_storageMapID), 0);
+        WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::ConnectToSessionStorageArea(WebProcess::singleton().sessionID(), m_namespace.storageNamespaceID(), m_securityOrigin->data()), Messages::StorageManagerSet::ConnectToSessionStorageArea::Reply(m_mapID), 0);
     }
 
-    if (m_storageMapID)
+    if (m_mapID)
         WebProcess::singleton().registerStorageAreaMap(*this);
 }
 
 void StorageAreaMap::disconnect()
 {
-    if (!m_storageMapID)
+    if (!m_mapID)
         return;
 
     resetValues();
     WebProcess::singleton().unregisterStorageAreaMap(*this);
 
-    if (auto networkProcessConnection = WebProcess::singleton().existingNetworkProcessConnection())
-        networkProcessConnection->connection().send(Messages::StorageManagerSet::DisconnectFromStorageArea(*m_storageMapID), 0);
+    if (auto* networkProcessConnection = WebProcess::singleton().existingNetworkProcessConnection())
+        networkProcessConnection->connection().send(Messages::StorageManagerSet::DisconnectFromStorageArea(*m_mapID), 0);
 
-    m_storageMapID = { };
+    m_mapID = { };
 }
 
 void StorageAreaMap::incrementUseCount()

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -46,12 +46,13 @@
 class StorageAreaImpl;
 class StorageNamespaceImpl;
 
-class StorageAreaMap : public RefCounted<StorageAreaMap>, private IPC::MessageReceiver, public CanMakeWeakPtr<StorageAreaMap> {
+class StorageAreaMap final : private IPC::MessageReceiver, public CanMakeWeakPtr<StorageAreaMap> {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
-    static Ref<StorageAreaMap> create(StorageNamespaceImpl*, Ref<WebCore::SecurityOrigin>&&);
+    StorageAreaMap(StorageNamespaceImpl&, Ref<WebCore::SecurityOrigin>&&);
     ~StorageAreaMap();
 
-    WebCore::StorageType storageType() const { return m_storageType; }
+    WebCore::StorageType type() const { return m_type; }
 
     unsigned length();
     String key(unsigned index);
@@ -62,29 +63,26 @@
     bool contains(const String& key);
 
     // IPC::MessageReceiver
-    void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
+    void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
 
     const WebCore::SecurityOrigin& securityOrigin() const { return m_securityOrigin.get(); }
+    const Optional<StorageAreaIdentifier>& identifier() const { return m_mapID; }
 
-    void connect();
     void disconnect();
-    const Optional<StorageAreaIdentifier>& identifier() const { return m_storageMapID; }
 
     void incrementUseCount();
     void decrementUseCount();
 
 private:
-    StorageAreaMap(StorageNamespaceImpl*, Ref<WebCore::SecurityOrigin>&&);
+    void didSetItem(uint64_t mapSeed, const String& key, bool quotaError);
+    void didRemoveItem(uint64_t mapSeed, const String& key);
+    void didClear(uint64_t mapSeed);
 
-    void didSetItem(uint64_t storageMapSeed, const String& key, bool quotaError);
-    void didRemoveItem(uint64_t storageMapSeed, const String& key);
-    void didClear(uint64_t storageMapSeed);
-
     void dispatchStorageEvent(const Optional<StorageAreaImplIdentifier>& sourceStorageAreaID, const String& key, const String& oldValue, const String& newValue, const String& urlString);
     void clearCache();
 
     void resetValues();
-    void loadValuesIfNeeded();
+    WebCore::StorageMap& ensureMap();
 
     bool shouldApplyChangeForKey(const String& key) const;
     void applyChange(const String& key, const String& newValue);
@@ -92,21 +90,18 @@
     void dispatchSessionStorageEvent(const Optional<StorageAreaImplIdentifier>&, const String& key, const String& oldValue, const String& newValue, const String& urlString);
     void dispatchLocalStorageEvent(const Optional<StorageAreaImplIdentifier>&, const String& key, const String& oldValue, const String& newValue, const String& urlString);
 
-    StorageNamespaceImpl* m_storageNamespace;
+    void connect();
 
-    Optional<StorageAreaIdentifier> m_storageMapID;
-
-    WebCore::StorageType m_storageType;
-    unsigned m_quotaInBytes;
+    StorageNamespaceImpl& m_namespace;
     Ref<WebCore::SecurityOrigin> m_securityOrigin;
-
-    RefPtr<WebCore::StorageMap> m_storageMap;
-
-    uint64_t m_currentSeed;
-    bool m_hasPendingClear;
+    RefPtr<WebCore::StorageMap> m_map;
+    Optional<StorageAreaIdentifier> m_mapID;
     HashCountedSet<String> m_pendingValueChanges;
     
     uint64_t m_useCount { 0 };
+    uint64_t m_currentSeed { 0 };
+    WebCore::StorageType m_type;
+    bool m_hasPendingClear { false };
 };
 
 } // namespace WebKit

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.messages.in (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.messages.in	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.messages.in	2020-02-13 01:38:20 UTC (rev 256495)
@@ -20,7 +20,7 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-messages -> StorageAreaMap {
+messages -> StorageAreaMap NotRefCounted {
     DidSetItem(uint64_t storageMapSeed, String key, bool quotaException)
     DidRemoveItem(uint64_t storageMapSeed, String key)
     DidClear(uint64_t storageMapSeed)

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp	2020-02-13 01:38:20 UTC (rev 256495)
@@ -102,17 +102,10 @@
 
 Ref<StorageArea> StorageNamespaceImpl::storageArea(const SecurityOriginData& securityOriginData)
 {
-    RefPtr<StorageAreaMap> map;
-
-    auto securityOrigin = securityOriginData.securityOrigin();
-    auto& slot = m_storageAreaMaps.add(securityOrigin->data(), nullptr).iterator->value;
-    if (!slot) {
-        map = StorageAreaMap::create(this, WTFMove(securityOrigin));
-        slot = map.get();
-    } else
-        map = slot;
-
-    return StorageAreaImpl::create(map.releaseNonNull());
+    auto& map = m_storageAreaMaps.ensure(securityOriginData, [&] {
+        return makeUnique<StorageAreaMap>(*this, securityOriginData.securityOrigin());
+    }).iterator->value;
+    return StorageAreaImpl::create(*map);
 }
 
 Ref<StorageNamespace> StorageNamespaceImpl::copy(Page& newPage)

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h (256494 => 256495)


--- branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h	2020-02-13 01:11:08 UTC (rev 256494)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h	2020-02-13 01:38:20 UTC (rev 256495)
@@ -80,7 +80,7 @@
 
     const unsigned m_quotaInBytes;
 
-    HashMap<WebCore::SecurityOriginData, RefPtr<StorageAreaMap>> m_storageAreaMaps;
+    HashMap<WebCore::SecurityOriginData, std::unique_ptr<StorageAreaMap>> m_storageAreaMaps;
 };
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to