Index: third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp |
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp |
index 0e0e4d7bbc3736348539d490c2c6be486c5f0c33..50b2b391332c611e7b1742e44574f38120fd3bf1 100644 |
--- a/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp |
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBOpenDBRequest.cpp |
@@ -65,6 +65,13 @@ DEFINE_TRACE(IDBOpenDBRequest) |
IDBRequest::trace(visitor); |
} |
+void IDBOpenDBRequest::stop() |
+{ |
+ IDBRequest::stop(); |
+ if (m_databaseCallbacks) |
+ m_databaseCallbacks->detachWebCallbacks(); |
+} |
+ |
const AtomicString& IDBOpenDBRequest::interfaceName() const |
{ |
return EventTargetNames::IDBOpenDBRequest; |
@@ -82,12 +89,6 @@ void IDBOpenDBRequest::onBlocked(int64_t oldVersion) |
void IDBOpenDBRequest::onUpgradeNeeded(int64_t oldVersion, std::unique_ptr<WebIDBDatabase> backend, const IDBDatabaseMetadata& metadata, WebIDBDataLoss dataLoss, String dataLossMessage) |
{ |
IDB_TRACE("IDBOpenDBRequest::onUpgradeNeeded()"); |
- if (m_contextStopped || !getExecutionContext()) { |
- std::unique_ptr<WebIDBDatabase> db = std::move(backend); |
- db->abort(m_transactionId); |
- db->close(); |
- return; |
- } |
if (!shouldEnqueueEvent()) |
return; |
@@ -114,12 +115,6 @@ void IDBOpenDBRequest::onUpgradeNeeded(int64_t oldVersion, std::unique_ptr<WebID |
void IDBOpenDBRequest::onSuccess(std::unique_ptr<WebIDBDatabase> backend, const IDBDatabaseMetadata& metadata) |
{ |
IDB_TRACE("IDBOpenDBRequest::onSuccess()"); |
- if (m_contextStopped || !getExecutionContext()) { |
- std::unique_ptr<WebIDBDatabase> db = std::move(backend); |
- if (db) |
- db->close(); |
- return; |
- } |
if (!shouldEnqueueEvent()) |
return; |