Modern IDB: storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html...
[WebKit-https.git] / Source / WebCore / Modules / indexeddb / client / IDBRequestImpl.cpp
index 5af8760e28a4947309b9a8dbe9ea7a53606615dd..03c2f9a2c7930423d6d017eb2334a0fc3b281b95 100644 (file)
@@ -266,8 +266,10 @@ bool IDBRequest::dispatchEvent(Event& event)
     targets.append(this);
 
     if (m_transaction) {
-        targets.append(m_transaction);
-        targets.append(m_transaction->db());
+        if (!m_transaction->isFinished())
+            targets.append(m_transaction);
+        if (!m_transaction->database().isClosingOrClosed())
+            targets.append(m_transaction->db());
     }
 
     m_hasPendingActivity = false;