Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IndexedDB 2.0: Queue up completed requests in the client, handle them…
… one by one. https://bugs.webkit.org/show_bug.cgi?id=165000 Reviewed by Alex Christensen. Source/WebCore: No new tests (Covered extensively by every existing test). Currently when a TransactionOperation completes on the server, it immediately completes itself on the client side, including scheduling an event dispatch if necessary. This patch changes it so that "server completed operations" instead queue up in the IDBTransaction and are "client-side completed" asynchronously, 1-by-1. Currently this is a "no behavior change" because only one operation is ever sent to the server at a time. But that will change with https://webkit.org/b/164932 And this patch is a pre-requisite for that. * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::dispatchEvent): (WebCore::IDBRequest::didOpenOrIterateCursor): (WebCore::IDBRequest::completeRequestAndDispatchEvent): (WebCore::IDBRequest::requestCompleted): Deleted. * Modules/indexeddb/IDBRequest.h: * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::IDBTransaction): (WebCore::IDBTransaction::internalAbort): (WebCore::IDBTransaction::abortOnServerAndCancelRequests): (WebCore::IDBTransaction::scheduleOperation): (WebCore::IDBTransaction::schedulePendingOperationTimer): (WebCore::IDBTransaction::pendingOperationTimerFired): (WebCore::IDBTransaction::operationCompletedOnServer): (WebCore::IDBTransaction::scheduleCompletedOperationTimer): (WebCore::IDBTransaction::completedOperationTimerFired): (WebCore::IDBTransaction::completeNoncursorRequest): (WebCore::IDBTransaction::completeCursorRequest): (WebCore::IDBTransaction::finishedDispatchEventForRequest): (WebCore::IDBTransaction::didStart): (WebCore::IDBTransaction::didOpenCursorOnServer): (WebCore::IDBTransaction::didIterateCursorOnServer): (WebCore::IDBTransaction::didGetAllRecordsOnServer): (WebCore::IDBTransaction::didGetRecordOnServer): (WebCore::IDBTransaction::didGetCountOnServer): (WebCore::IDBTransaction::didDeleteRecordOnServer): (WebCore::IDBTransaction::didClearObjectStoreOnServer): (WebCore::IDBTransaction::putOrAddOnServer): (WebCore::IDBTransaction::didPutOrAddOnServer): (WebCore::IDBTransaction::operationCompletedOnClient): (WebCore::IDBTransaction::deactivate): (WebCore::IDBTransaction::connectionClosedFromServer): (WebCore::IDBTransaction::scheduleOperationTimer): Deleted. (WebCore::IDBTransaction::operationTimerFired): Deleted. (WebCore::IDBTransaction::operationDidComplete): Deleted. * Modules/indexeddb/IDBTransaction.h: * Modules/indexeddb/client/IDBConnectionProxy.cpp: (WebCore::IDBClient::IDBConnectionProxy::completeOperation): * Modules/indexeddb/client/TransactionOperation.cpp: (WebCore::IDBClient::TransactionOperation::TransactionOperation): * Modules/indexeddb/client/TransactionOperation.h: (WebCore::IDBClient::TransactionOperation::transitionToCompleteOnThisThread): (WebCore::IDBClient::TransactionOperation::transitionToComplete): (WebCore::IDBClient::TransactionOperation::doComplete): (WebCore::IDBClient::TransactionOperation::idbRequest): (WebCore::IDBClient::TransactionOperation::performCompleteOnOriginThread): Deleted. (WebCore::IDBClient::TransactionOperation::completed): Deleted. LayoutTests: * storage/indexeddb/modern/resources/transaction-scheduler-6.js: This test had a bug which was masked by previously synchronous behavior. Fix that bug! Canonical link: https://commits.webkit.org/182759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
11 changed files
with
246 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.