Changeset 150925 in webkit


Ignore:
Timestamp:
May 29, 2013 12:43:30 PM (11 years ago)
Author:
andersca@apple.com
Message:

Return earlier if there's no session storage namespace
https://bugs.webkit.org/show_bug.cgi?id=116984
<rdar://problem/13976781>

Reviewed by Tim Horton.

If we can't find a session storage namespace, return before creating an entry in the m_storageAreasByConnection
hash map since then we'll crash trying to remove it later.

  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::createSessionStorageMap):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r150921 r150925  
     12013-05-29  Anders Carlsson  <andersca@apple.com>
     2
     3        Return earlier if there's no session storage namespace
     4        https://bugs.webkit.org/show_bug.cgi?id=116984
     5        <rdar://problem/13976781>
     6
     7        Reviewed by Tim Horton.
     8
     9        If we can't find a session storage namespace, return before creating an entry in the m_storageAreasByConnection
     10        hash map since then we'll crash trying to remove it later.
     11
     12        * UIProcess/Storage/StorageManager.cpp:
     13        (WebKit::StorageManager::createSessionStorageMap):
     14
    1152013-05-29  Martin Robinson  <mrobinson@igalia.com>
    216
  • trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp

    r150648 r150925  
    462462void StorageManager::createSessionStorageMap(CoreIPC::Connection* connection, uint64_t storageMapID, uint64_t storageNamespaceID, const SecurityOriginData& securityOriginData)
    463463{
    464     std::pair<RefPtr<CoreIPC::Connection>, uint64_t> connectionAndStorageMapIDPair(connection, storageMapID);
    465 
    466464    // FIXME: This should be a message check.
    467     ASSERT((HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea>>::isValidKey(connectionAndStorageMapIDPair)));
    468 
    469     HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea>>::AddResult result = m_storageAreasByConnection.add(connectionAndStorageMapIDPair, 0);
    470 
    471     // FIXME: This should be a message check.
    472     ASSERT(result.isNewEntry);
    473 
    474465    ASSERT((HashMap<uint64_t, RefPtr<SessionStorageNamespace>>::isValidKey(storageNamespaceID)));
    475466    SessionStorageNamespace* sessionStorageNamespace = m_sessionStorageNamespaces.get(storageNamespaceID);
     
    480471    }
    481472
     473    std::pair<RefPtr<CoreIPC::Connection>, uint64_t> connectionAndStorageMapIDPair(connection, storageMapID);
     474
     475    // FIXME: This should be a message check.
     476    ASSERT((HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea>>::isValidKey(connectionAndStorageMapIDPair)));
     477
     478    HashMap<std::pair<RefPtr<CoreIPC::Connection>, uint64_t>, RefPtr<StorageArea>>::AddResult result = m_storageAreasByConnection.add(connectionAndStorageMapIDPair, 0);
     479
     480    // FIXME: This should be a message check.
     481    ASSERT(result.isNewEntry);
     482
    482483    // FIXME: This should be a message check.
    483484    ASSERT(connection == sessionStorageNamespace->allowedConnection());
Note: See TracChangeset for help on using the changeset viewer.