Changeset 239380 in webkit


Ignore:
Timestamp:
Dec 19, 2018 10:57:09 AM (5 years ago)
Author:
Truitt Savell
Message:

Unreviewed, rolling out r239358.

Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
crash on Debug bots

Reverted changeset:

"Clean up IndexedDB files between tests"
https://bugs.webkit.org/show_bug.cgi?id=192796
https://trac.webkit.org/changeset/239358

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r239379 r239380  
     12018-12-19  Truitt Savell  <tsavell@apple.com>
     2
     3        Unreviewed, rolling out r239358.
     4
     5        Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
     6        crash on Debug bots
     7
     8        Reverted changeset:
     9
     10        "Clean up IndexedDB files between tests"
     11        https://bugs.webkit.org/show_bug.cgi?id=192796
     12        https://trac.webkit.org/changeset/239358
     13
    1142018-12-19  Don Olmstead  <don.olmstead@sony.com>
    215
  • trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp

    r239358 r239380  
    510510
    511511    HashSet<UniqueIDBDatabase*> openDatabases;
    512     for (auto& database : m_uniqueIDBDatabaseMap.values())
    513         openDatabases.add(database.get());
     512    for (auto* connection : m_databaseConnections.values())
     513        openDatabases.add(connection->database());
    514514
    515515    for (auto& database : openDatabases)
  • trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp

    r239358 r239380  
    295295    m_backingStoreIsEphemeral = false;
    296296
    297     if (!m_databaseQueue.isEmpty()) {
    298         postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::shutdownForClose));
    299         return;
    300     }
     297    ASSERT(m_databaseQueue.isEmpty());
    301298    m_databaseQueue.kill();
    302299
     
    340337
    341338    m_deleteBackingStoreInProgress = false;
    342 
    343     if (!m_hardClosedForUserDelete)
    344         invokeOperationAndTransactionTimer();
     339    invokeOperationAndTransactionTimer();
    345340}
    346341
     
    349344    ASSERT(isMainThread());
    350345    LOG(IndexedDB, "(main) UniqueIDBDatabase::handleDatabaseOperations - There are %u pending", m_pendingOpenDBRequests.size());
    351 
    352     if (m_hardClosedForUserDelete)
    353         return;
     346    ASSERT(!m_hardClosedForUserDelete);
    354347
    355348    if (m_deleteBackingStoreInProgress)
     
    12861279    LOG(IndexedDB, "(db) UniqueIDBDatabase::performPrefetchCursor");
    12871280
    1288     if (m_owningPointerForClose)
    1289         return;
    1290 
    12911281    if (m_backingStore->prefetchCursor(transactionIdentifier, cursorIdentifier))
    12921282        postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::performPrefetchCursor, transactionIdentifier, cursorIdentifier));
     
    18291819        transaction->databaseConnection().deleteTransaction(*transaction);
    18301820    m_pendingTransactions.clear();
     1821    m_objectStoreTransactionCounts.clear();
     1822    m_objectStoreWriteTransactions.clear();
    18311823
    18321824    // Error out all pending callbacks
  • trunk/Source/WebKit/ChangeLog

    r239367 r239380  
     12018-12-19  Truitt Savell  <tsavell@apple.com>
     2
     3        Unreviewed, rolling out r239358.
     4
     5        Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
     6        crash on Debug bots
     7
     8        Reverted changeset:
     9
     10        "Clean up IndexedDB files between tests"
     11        https://bugs.webkit.org/show_bug.cgi?id=192796
     12        https://trac.webkit.org/changeset/239358
     13
    1142018-12-18  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp

    r239358 r239380  
    512512}
    513513
    514 void WKWebsiteDataStoreRemoveAllIndexedDatabases(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreRemoveAllIndexedDatabasesCallback callback)
     514void WKWebsiteDataStoreRemoveAllIndexedDatabases(WKWebsiteDataStoreRef dataStoreRef)
    515515{
    516516    OptionSet<WebKit::WebsiteDataType> dataTypes = WebKit::WebsiteDataType::IndexedDBDatabases;
    517     WebKit::toImpl(dataStoreRef)->websiteDataStore().removeData(dataTypes, -WallTime::infinity(), [context, callback] {
    518         if (callback)
    519             callback(context);
    520     });
     517    WebKit::toImpl(dataStoreRef)->websiteDataStore().removeData(dataTypes, -WallTime::infinity(), [] { });
    521518}
    522519
  • trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h

    r239358 r239380  
    104104WK_EXPORT void WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreRemoveAllServiceWorkerRegistrationsCallback callback);
    105105
    106 typedef void (*WKWebsiteDataStoreRemoveAllIndexedDatabasesCallback)(void* functionContext);
    107 WK_EXPORT void WKWebsiteDataStoreRemoveAllIndexedDatabases(WKWebsiteDataStoreRef dataStoreRef, void* context, WKWebsiteDataStoreRemoveAllIndexedDatabasesCallback callback);
     106WK_EXPORT void WKWebsiteDataStoreRemoveAllIndexedDatabases(WKWebsiteDataStoreRef dataStoreRef);
    108107
    109108typedef void (*WKWebsiteDataStoreGetFetchCacheOriginsFunction)(WKArrayRef, void*);
  • trunk/Tools/ChangeLog

    r239369 r239380  
     12018-12-19  Truitt Savell  <tsavell@apple.com>
     2
     3        Unreviewed, rolling out r239358.
     4
     5        Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
     6        crash on Debug bots
     7
     8        Reverted changeset:
     9
     10        "Clean up IndexedDB files between tests"
     11        https://bugs.webkit.org/show_bug.cgi?id=192796
     12        https://trac.webkit.org/changeset/239358
     13
    1142018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r239358 r239380  
    20132013    gTestRunner->setIconDatabaseEnabled(false);
    20142014    gTestRunner->clearAllApplicationCaches();
    2015     gTestRunner->clearAllDatabases();
    2016     gTestRunner->setIDBPerOriginQuota(50 * MB);
    20172015
    20182016    if (disallowedURLs)
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r239358 r239380  
    868868    WKContextClearCachedCredentials(TestController::singleton().context());
    869869
    870     ClearIndexedDatabases();
    871     setIDBPerOriginQuota(50 * MB);
    872 
    873870    clearServiceWorkerRegistrations();
    874871    clearDOMCaches();
     
    27632760}
    27642761
    2765 struct RemoveAllIndexedDatabasesCallbackContext {
    2766     explicit RemoveAllIndexedDatabasesCallbackContext(TestController& controller)
    2767         : testController(controller)
    2768         {
    2769         }
    2770     TestController& testController;
    2771     bool done { false };
    2772 };
    2773 static void RemoveAllIndexedDatabasesCallback(void* userData)
    2774 {
    2775     auto* context = static_cast<RemoveAllIndexedDatabasesCallbackContext*>(userData);
    2776     context->done = true;
    2777     context->testController.notifyDone();
    2778 }
    2779 void TestController::ClearIndexedDatabases()
    2780 {
    2781     auto websiteDataStore = WKContextGetWebsiteDataStore(platformContext());
    2782     RemoveAllIndexedDatabasesCallbackContext context(*this);
    2783     WKWebsiteDataStoreRemoveAllIndexedDatabases(websiteDataStore, &context, RemoveAllIndexedDatabasesCallback);
    2784     runUntil(context.done, noTimeout);
    2785 }
    2786 
    27872762struct FetchCacheOriginsCallbackContext {
    27882763    FetchCacheOriginsCallbackContext(TestController& controller, WKStringRef origin)
  • trunk/Tools/WebKitTestRunner/TestController.h

    r239358 r239380  
    243243    void removeAllSessionCredentials();
    244244
    245     void ClearIndexedDatabases();
    246 
    247245    void clearServiceWorkerRegistrations();
    248246
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r239358 r239380  
    904904   
    905905    if (WKStringIsEqualToUTF8CString(messageName, "DeleteAllIndexedDatabases")) {
    906         WKWebsiteDataStoreRemoveAllIndexedDatabases(WKContextGetWebsiteDataStore(TestController::singleton().context()), nullptr, { });
     906        WKWebsiteDataStoreRemoveAllIndexedDatabases(WKContextGetWebsiteDataStore(TestController::singleton().context()));
    907907        return nullptr;
    908908    }
Note: See TracChangeset for help on using the changeset viewer.