IDB: indexeddb/mozilla/add-twice-failure.html fails
[WebKit-https.git] / Source / WebCore / Modules / indexeddb / IDBTransactionBackendOperations.cpp
index 8d92097..86b7c2b 100644 (file)
@@ -123,10 +123,7 @@ void PutOperation::perform(std::function<void()> completionCallback)
     ASSERT(m_transaction->mode() != IndexedDB::TransactionMode::ReadOnly);
     ASSERT(m_indexIDs.size() == m_indexKeys.size());
 
-    RefPtr<PutOperation> operation(this);
-    STANDARD_DATABASE_ERROR_CALLBACK;
-
-    m_transaction->database().serverConnection().put(*m_transaction, *this, [this, operation, operationCallback](PassRefPtr<IDBKey> key, PassRefPtr<IDBDatabaseError> prpError) {
+    m_transaction->database().serverConnection().put(*m_transaction, *this, [this, completionCallback](PassRefPtr<IDBKey> key, PassRefPtr<IDBDatabaseError> prpError) {
         RefPtr<IDBDatabaseError> error = prpError;
         if (key) {
             ASSERT(!error);
@@ -135,7 +132,7 @@ void PutOperation::perform(std::function<void()> completionCallback)
             ASSERT(error);
             m_callbacks->onError(error);
         }
-        operationCallback(error.release());
+        completionCallback();
     });
 }