Unreviewed, rolling out r241722.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Feb 2019 16:42:21 +0000 (16:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Feb 2019 16:42:21 +0000 (16:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194801

Causing time outs and EWS failures after expectation file was
added. (Requested by ShawnRoberts on #webkit).

Reverted changeset:

"IndexedDB: leak IDBDatabase and IDBTransacstion in layout
tests"
https://bugs.webkit.org/show_bug.cgi?id=194709
https://trac.webkit.org/changeset/241722

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

LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/IDBObject-leak.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl

index 53022cc..e26eaf6 100644 (file)
@@ -1,3 +1,18 @@
+2019-02-19  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r241722.
+        https://bugs.webkit.org/show_bug.cgi?id=194801
+
+        Causing time outs and EWS failures after expectation file was
+        added. (Requested by ShawnRoberts on #webkit).
+
+        Reverted changeset:
+
+        "IndexedDB: leak IDBDatabase and IDBTransacstion in layout
+        tests"
+        https://bugs.webkit.org/show_bug.cgi?id=194709
+        https://trac.webkit.org/changeset/241722
+
 2019-02-19  Antoine Quint  <graouts@apple.com>
 
         [iOS] "touch-action: none" should not prevent text selection or tapping on a link
diff --git a/LayoutTests/storage/indexeddb/IDBObject-leak.html b/LayoutTests/storage/indexeddb/IDBObject-leak.html
deleted file mode 100644 (file)
index 5507b82..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/js-test.js"></script>
-<script src="resources/shared.js"></script>
-<script>
-description('This test verifies that IDBTransaction objects are freed.');
-
-function test() {
-    if (!window.internals || !internals.numberOfIDBTransactions) {
-        testFailed('This test requires access to the Internals object');
-        finishJSTest();
-        return;
-    }
-
-    if (sessionStorage.doneFirstLoad) {
-        gc();
-        shouldBeEqualToNumber("internals.numberOfIDBTransactions()", 0);
-        finishJSTest();
-        return;
-    }
-
-    var dbname = setDBNameFromPath() + Date();
-    var request =  window.indexedDB.open(dbname);
-    request.onupgradeneeded = function(evt) {
-        sessionStorage.doneFirstLoad = true;
-        if (window.testRunner) {
-            testRunner.waitUntilDone();
-            testRunner.terminateNetworkProcess();
-        } else {
-            testFailed('This test requires access to the TestRunner object');
-        }
-        setTimeout((()=> {
-            location.reload();
-        }), 0);
-    }
-}
-
-test();
-</script>
index 5bdc6d3..a6da53f 100644 (file)
@@ -1,3 +1,18 @@
+2019-02-19  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r241722.
+        https://bugs.webkit.org/show_bug.cgi?id=194801
+
+        Causing time outs and EWS failures after expectation file was
+        added. (Requested by ShawnRoberts on #webkit).
+
+        Reverted changeset:
+
+        "IndexedDB: leak IDBDatabase and IDBTransacstion in layout
+        tests"
+        https://bugs.webkit.org/show_bug.cgi?id=194709
+        https://trac.webkit.org/changeset/241722
+
 2019-02-16  Darin Adler  <darin@apple.com>
 
         Continue reducing use of String::format, now focusing on hex: "%p", "%x", etc.
index 0a09572..1847439 100644 (file)
@@ -264,8 +264,7 @@ void IDBDatabase::connectionToServerLost(const IDBError& error)
     m_closePending = true;
     m_closedInServer = true;
 
-    auto transactions = copyToVector(m_activeTransactions.values());
-    for (auto& transaction : transactions)
+    for (auto& transaction : m_activeTransactions.values())
         transaction->connectionClosedFromServer(error);
 
     auto errorEvent = Event::create(m_eventNames.errorEvent, Event::CanBubble::Yes, Event::IsCancelable::No);
index e38204c..2e965e9 100644 (file)
@@ -79,9 +79,6 @@ IDBTransaction::IDBTransaction(IDBDatabase& database, const IDBTransactionInfo&
     , m_currentlyCompletingRequest(request)
 
 {
-    auto addResult = allIDBTransactions().add(this);
-    ASSERT_UNUSED(addResult, addResult.isNewEntry);
-
     LOG(IndexedDB, "IDBTransaction::IDBTransaction - %s", m_info.loggingString().utf8().data());
     ASSERT(&m_database->originThread() == &Thread::current());
 
@@ -109,14 +106,6 @@ IDBTransaction::IDBTransaction(IDBDatabase& database, const IDBTransactionInfo&
 IDBTransaction::~IDBTransaction()
 {
     ASSERT(&m_database->originThread() == &Thread::current());
-    ASSERT(allIDBTransactions().contains(this));
-    allIDBTransactions().remove(this);
-}
-
-HashSet<IDBTransaction*>& IDBTransaction::allIDBTransactions()
-{
-    static NeverDestroyed<HashSet<IDBTransaction*>> transactions;
-    return transactions;
 }
 
 IDBClient::IDBConnectionProxy& IDBTransaction::connectionProxy()
@@ -1445,8 +1434,7 @@ void IDBTransaction::connectionClosedFromServer(const IDBError& error)
 {
     LOG(IndexedDB, "IDBTransaction::connectionClosedFromServer - %s", error.message().utf8().data());
 
-    m_database->willAbortTransaction(*this);
-    transitionedToFinishing(IndexedDB::TransactionState::Aborting);
+    m_state = IndexedDB::TransactionState::Aborting;
 
     abortInProgressOperations(error);
 
@@ -1457,7 +1445,6 @@ void IDBTransaction::connectionClosedFromServer(const IDBError& error)
         ASSERT(m_transactionOperationsInProgressQueue.first() == operation.get());
         operation->doComplete(IDBResultData::error(operation->identifier(), error));
     }
-    m_currentlyCompletingRequest = nullptr;
 
     connectionProxy().forgetActiveOperations(operations);
 
@@ -1467,7 +1454,6 @@ void IDBTransaction::connectionClosedFromServer(const IDBError& error)
 
     m_idbError = error;
     m_domError = error.toDOMException();
-    m_database->didAbortTransaction(*this);
     fireOnAbort();
 }
 
index edd15e6..722f12c 100644 (file)
@@ -152,8 +152,6 @@ public:
 
     void visitReferencedObjectStores(JSC::SlotVisitor&) const;
 
-    WEBCORE_EXPORT static HashSet<IDBTransaction*>& allIDBTransactions();
-
 private:
     IDBTransaction(IDBDatabase&, const IDBTransactionInfo&, IDBOpenDBRequest*);
 
index c30d5e1..b06a1f8 100644 (file)
@@ -93,8 +93,6 @@
 #include "HistoryController.h"
 #include "HistoryItem.h"
 #include "HitTestResult.h"
-#include "IDBRequest.h"
-#include "IDBTransaction.h"
 #include "InspectorClient.h"
 #include "InspectorController.h"
 #include "InspectorFrontendClientLocal.h"
@@ -2385,11 +2383,6 @@ ExceptionOr<unsigned> Internals::countFindMatches(const String& text, const Vect
     return document->page()->countFindMatches(text, parsedOptions.releaseReturnValue(), 1000);
 }
 
-unsigned Internals::numberOfIDBTransactions() const
-{
-    return IDBTransaction::allIDBTransactions().size();
-}
-
 unsigned Internals::numberOfLiveNodes() const
 {
     unsigned nodeCount = 0;
index 4e4d9d7..c19382f 100644 (file)
@@ -378,8 +378,6 @@ public:
     ExceptionOr<void> insertAuthorCSS(const String&) const;
     ExceptionOr<void> insertUserCSS(const String&) const;
 
-    unsigned numberOfIDBTransactions() const;
-
     unsigned numberOfLiveNodes() const;
     unsigned numberOfLiveDocuments() const;
     unsigned referencingNodeCount(const Document&) const;
index 01399ec..e638512 100644 (file)
@@ -405,8 +405,6 @@ enum CompositingPolicy {
     void beginSimulatedMemoryPressure();
     void endSimulatedMemoryPressure();
 
-    unsigned long numberOfIDBTransactions();
-
     unsigned long numberOfLiveNodes();
     unsigned long numberOfLiveDocuments();
     unsigned long referencingNodeCount(Document document);