Changeset 248666 in webkit


Ignore:
Timestamp:
Aug 14, 2019 3:13:55 AM (5 years ago)
Author:
youenn@apple.com
Message:

Make WebSWOriginStore::m_webSWServerConnections a WeakHashSet
https://bugs.webkit.org/show_bug.cgi?id=200661

Reviewed by Alex Christensen.

  • NetworkProcess/ServiceWorker/WebSWOriginStore.cpp:

(WebKit::WebSWOriginStore::importComplete):
(WebKit::WebSWOriginStore::registerSWServerConnection):
(WebKit::WebSWOriginStore::unregisterSWServerConnection):
(WebKit::WebSWOriginStore::didInvalidateSharedMemory):

  • NetworkProcess/ServiceWorker/WebSWOriginStore.h:
Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r248665 r248666  
     12019-08-14  Youenn Fablet  <youenn@apple.com>
     2
     3        Make WebSWOriginStore::m_webSWServerConnections a WeakHashSet
     4        https://bugs.webkit.org/show_bug.cgi?id=200661
     5
     6        Reviewed by Alex Christensen.
     7
     8        * NetworkProcess/ServiceWorker/WebSWOriginStore.cpp:
     9        (WebKit::WebSWOriginStore::importComplete):
     10        (WebKit::WebSWOriginStore::registerSWServerConnection):
     11        (WebKit::WebSWOriginStore::unregisterSWServerConnection):
     12        (WebKit::WebSWOriginStore::didInvalidateSharedMemory):
     13        * NetworkProcess/ServiceWorker/WebSWOriginStore.h:
     14
    1152019-08-14  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.cpp

    r236477 r248666  
    6262{
    6363    m_isImported = true;
    64     for (auto* connection : m_webSWServerConnections)
    65         connection->send(Messages::WebSWClientConnection::SetSWOriginTableIsImported());
     64    for (auto& connection : m_webSWServerConnections)
     65        connection.send(Messages::WebSWClientConnection::SetSWOriginTableIsImported());
    6666}
    6767
    6868void WebSWOriginStore::registerSWServerConnection(WebSWServerConnection& connection)
    6969{
    70     m_webSWServerConnections.add(&connection);
     70    m_webSWServerConnections.add(connection);
    7171
    7272    if (!m_store.isEmpty())
     
    7979void WebSWOriginStore::unregisterSWServerConnection(WebSWServerConnection& connection)
    8080{
    81     m_webSWServerConnections.remove(&connection);
     81    m_webSWServerConnections.remove(connection);
    8282}
    8383
     
    9393void WebSWOriginStore::didInvalidateSharedMemory()
    9494{
    95     for (auto* connection : m_webSWServerConnections)
    96         sendStoreHandle(*connection);
     95    for (auto& connection : m_webSWServerConnections)
     96        sendStoreHandle(connection);
    9797}
    9898
  • trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWOriginStore.h

    r236477 r248666  
    3030#include "SharedStringHashStore.h"
    3131#include <WebCore/SWOriginStore.h>
    32 #include <wtf/HashSet.h>
     32#include <wtf/WeakHashSet.h>
    3333
    3434namespace WebKit {
     
    5656    SharedStringHashStore m_store;
    5757    bool m_isImported { false };
    58     HashSet<WebSWServerConnection*> m_webSWServerConnections;
     58    WeakHashSet<WebSWServerConnection> m_webSWServerConnections;
    5959};
    6060
Note: See TracChangeset for help on using the changeset viewer.