Changeset 247163 in webkit


Ignore:
Timestamp:
Jul 5, 2019 11:00:54 AM (5 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r247159.

IndexedDB layout tests are failing the new assert.

Reverted changeset:

"ASSERT that a sessionID is valid when encoding it"
https://bugs.webkit.org/show_bug.cgi?id=199302
https://trac.webkit.org/changeset/247159

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r247162 r247163  
     12019-07-05  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r247159.
     4
     5        IndexedDB layout tests are failing the new assert.
     6
     7        Reverted changeset:
     8
     9        "ASSERT that a sessionID is valid when encoding it"
     10        https://bugs.webkit.org/show_bug.cgi?id=199302
     11        https://trac.webkit.org/changeset/247159
     12
    1132019-07-05  Ryan Haddad  <ryanhaddad@apple.com>
    214
  • trunk/Source/WebCore/Modules/indexeddb/IDBValue.h

    r247159 r247163  
    5151    const ThreadSafeDataBuffer& data() const { return m_data; }
    5252    const Vector<String>& blobURLs() const { return m_blobURLs; }
    53     const PAL::SessionID& sessionID() const;
     53    const PAL::SessionID& sessionID() const { return m_sessionID; }
    5454    const Vector<String>& blobFilePaths() const { return m_blobFilePaths; }
    5555
     
    6060    ThreadSafeDataBuffer m_data;
    6161    Vector<String> m_blobURLs;
    62     mutable Optional<PAL::SessionID> m_sessionID;
     62    PAL::SessionID m_sessionID;
    6363    Vector<String> m_blobFilePaths;
    6464};
    6565
    66 inline const PAL::SessionID& IDBValue::sessionID() const
    67 {
    68     // FIXME: We should assert m_sessionID is valid or remove m_sessionID.
    69     if (!m_sessionID)
    70         m_sessionID = PAL::SessionID { };
    71     return *m_sessionID;
    72 }
    7366
    7467template<class Encoder>
  • trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.cpp

    r247159 r247163  
    9999    destination.m_requestType = source.m_requestType;
    100100
    101     if (source.m_databaseIdentifier)
    102         destination.m_databaseIdentifier = source.m_databaseIdentifier->isolatedCopy();
     101    destination.m_databaseIdentifier = source.m_databaseIdentifier.isolatedCopy();
    103102
    104103    if (source.m_requestIdentifier)
  • trunk/Source/WebCore/Modules/indexeddb/shared/IDBRequestData.h

    r247159 r247163  
    6666    IDBResourceIdentifier cursorIdentifier() const;
    6767
    68     const IDBDatabaseIdentifier& databaseIdentifier() const;
     68    const IDBDatabaseIdentifier& databaseIdentifier() const { return m_databaseIdentifier; }
    6969    uint64_t requestedVersion() const;
    7070
     
    9090    IndexedDB::IndexRecordType m_indexRecordType;
    9191
    92     mutable Optional<IDBDatabaseIdentifier> m_databaseIdentifier;
     92    IDBDatabaseIdentifier m_databaseIdentifier;
    9393    uint64_t m_requestedVersion { 0 };
    9494
    9595    IndexedDB::RequestType m_requestType { IndexedDB::RequestType::Other };
    9696};
    97 
    98 inline const IDBDatabaseIdentifier& IDBRequestData::databaseIdentifier() const
    99 {
    100     ASSERT(m_databaseIdentifier);
    101     if (!m_databaseIdentifier)
    102         m_databaseIdentifier = IDBDatabaseIdentifier { };
    103     return *m_databaseIdentifier;
    104 }
    10597
    10698template<class Encoder>
     
    137129        return false;
    138130
    139     Optional<Optional<IDBDatabaseIdentifier>> databaseIdentifier;
     131    Optional<IDBDatabaseIdentifier> databaseIdentifier;
    140132    decoder >> databaseIdentifier;
    141133    if (!databaseIdentifier)
  • trunk/Source/WebCore/PAL/ChangeLog

    r247159 r247163  
     12019-07-05  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r247159.
     4
     5        IndexedDB layout tests are failing the new assert.
     6
     7        Reverted changeset:
     8
     9        "ASSERT that a sessionID is valid when encoding it"
     10        https://bugs.webkit.org/show_bug.cgi?id=199302
     11        https://trac.webkit.org/changeset/247159
     12
    1132019-07-05  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/Source/WebCore/PAL/pal/SessionID.h

    r247159 r247163  
    8181void SessionID::encode(Encoder& encoder) const
    8282{
    83     ASSERT(isValid());
     83    // FIXME: Eliminate places that encode invalid SessionIDs, then ASSERT here that the sessionID is valid.
    8484    encoder << m_sessionID;
    8585}
     
    105105        return WTF::nullopt;
    106106
    107     // FIXME: We should fail to decode an invalid sessionID.
    108     ASSERT(SessionID { *sessionID }.isValid());
     107    // FIXME: Eliminate places that encode invalid SessionIDs, then fail to decode an invalid sessionID.
    109108    return SessionID { *sessionID };
    110109}
Note: See TracChangeset for help on using the changeset viewer.