Changeset 193970 in webkit
- Timestamp:
- Dec 11, 2015, 11:56:18 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r193969 r193970 1 2015-12-11 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html fails. 4 https://bugs.webkit.org/show_bug.cgi?id=152177 5 6 Reviewed by Alex Christensen. 7 8 * platform/mac-wk1/TestExpectations: 9 * platform/wk2/storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt: Copied from LayoutTests/storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt. 10 * storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt: 11 * storage/indexeddb/resources/intversion-abort-in-initial-upgradeneeded.js: 12 1 13 2015-12-11 Jiewen Tan <jiewen_tan@apple.com> 2 14 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r193968 r193970 98 98 storage/indexeddb/index-basics.html [ Failure ] 99 99 storage/indexeddb/index-duplicate-keypaths.html [ Failure ] 100 storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html [ Failure ]101 100 storage/indexeddb/intversion-close-in-oncomplete.html [ Failure ] 102 101 storage/indexeddb/intversion-close-in-upgradeneeded.html [ Failure ] -
trunk/LayoutTests/platform/wk2/storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt
r193969 r193970 21 21 22 22 onError(): 23 PASS db is event.target.result 23 FAIL event.target.result should be undefined (of type undefined). Was [object IDBDatabase] (of type object). 24 24 PASS request is event.target 25 25 PASS event.target.error.name is "AbortError" 26 PASS event.target.result.version is 027 26 PASS request.transaction is null 28 27 PASS successfullyParsed is true -
trunk/LayoutTests/storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt
r136475 r193970 21 21 22 22 onError(): 23 PASS db is event.target.result23 PASS event.target.result is undefined 24 24 PASS request is event.target 25 25 PASS event.target.error.name is "AbortError" 26 PASS event.target.result.version is 027 26 PASS request.transaction is null 28 27 PASS successfullyParsed is true -
trunk/LayoutTests/storage/indexeddb/resources/intversion-abort-in-initial-upgradeneeded.js
r163963 r193970 45 45 { 46 46 preamble(evt); 47 shouldBe(" db", "event.target.result");47 shouldBe("event.target.result", "undefined"); 48 48 shouldBe("request", "event.target"); 49 49 shouldBeEqualToString("event.target.error.name", "AbortError"); 50 shouldBe("event.target.result.version", "0");51 50 shouldBeNull("request.transaction"); 52 51 finishJSTest(); -
trunk/Source/WebCore/ChangeLog
r193968 r193970 1 2015-12-11 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html fails. 4 https://bugs.webkit.org/show_bug.cgi?id=152177 5 6 Reviewed by Alex Christensen. 7 8 No new tests (At least one failing test now passes). 9 10 * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: 11 (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionDidFinish): Renamed from below. 12 (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Deleted. 13 * Modules/indexeddb/client/IDBOpenDBRequestImpl.h: 14 15 * Modules/indexeddb/client/IDBRequestImpl.cpp: 16 (WebCore::IDBClient::IDBRequest::setVersionChangeTransaction): OpenDBRequests usually don't have transactions, 17 unless they end up being upgrade requests. 18 * Modules/indexeddb/client/IDBRequestImpl.h: 19 20 * Modules/indexeddb/client/IDBTransactionImpl.cpp: 21 (WebCore::IDBClient::IDBTransaction::IDBTransaction): Call setVersionChangeTransaction on the request if appropriate. 22 (WebCore::IDBClient::IDBTransaction::dispatchEvent): Call versionChangeTransactionDidFinish after the 23 abort/complete events fire. 24 (WebCore::IDBClient::IDBTransaction::abort): Deleted. 25 (WebCore::IDBClient::IDBTransaction::commit): Deleted. 26 1 27 2015-12-11 Brady Eidson <beidson@apple.com> 2 28 -
trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp
r193936 r193970 68 68 } 69 69 70 void IDBOpenDBRequest::versionChangeTransaction WillFinish()70 void IDBOpenDBRequest::versionChangeTransactionDidFinish() 71 71 { 72 72 // 3.3.7 "versionchange" transaction steps 73 // When the transaction is finished, immediately set request's transaction property to null.73 // When the transaction is finished, after firing complete/abort on the transaction, immediately set request's transaction property to null. 74 74 m_shouldExposeTransactionToDOM = false; 75 75 } -
trunk/Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h
r193936 r193970 54 54 void requestBlocked(uint64_t oldVersion, uint64_t newVersion); 55 55 56 void versionChangeTransaction WillFinish();56 void versionChangeTransactionDidFinish(); 57 57 void fireSuccessAfterVersionChangeCommit(); 58 58 void fireErrorAfterVersionChangeCompletion(); -
trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp
r193936 r193970 156 156 } 157 157 158 void IDBRequest::setVersionChangeTransaction(IDBTransaction& transaction) 159 { 160 ASSERT(!m_transaction); 161 ASSERT(transaction.isVersionChange()); 162 ASSERT(!transaction.isFinishedOrFinishing()); 163 164 m_transaction = &transaction; 165 } 166 158 167 RefPtr<WebCore::IDBTransaction> IDBRequest::transaction() const 159 168 { -
trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.h
r193487 r193970 99 99 100 100 void setSource(IDBCursor&); 101 void setVersionChangeTransaction(IDBTransaction&); 101 102 102 103 protected: -
trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp
r193936 r193970 72 72 if (m_info.mode() == IndexedDB::TransactionMode::VersionChange) { 73 73 ASSERT(m_openDBRequest); 74 m_openDBRequest->setVersionChangeTransaction(*this); 74 75 m_startedOnServer = true; 75 76 } else { … … 191 192 for (auto& objectStore : m_referencedObjectStores.values()) 192 193 objectStore->rollbackInfoForVersionChangeAbort(); 193 194 ASSERT(m_openDBRequest);195 m_openDBRequest->versionChangeTransactionWillFinish();196 194 } 197 195 … … 309 307 m_state = IndexedDB::TransactionState::Committing; 310 308 m_database->willCommitTransaction(*this); 311 312 if (isVersionChange()) {313 ASSERT(m_openDBRequest);314 m_openDBRequest->versionChangeTransactionWillFinish();315 }316 309 317 310 auto operation = createTransactionOperation(*this, nullptr, &IDBTransaction::commitOnServer); … … 426 419 bool result = IDBEventDispatcher::dispatch(event, targets); 427 420 428 if (isVersionChange() && event.type() == eventNames().completeEvent) {421 if (isVersionChange()) { 429 422 ASSERT(m_openDBRequest); 430 431 if (m_database->isClosingOrClosed()) 432 m_openDBRequest->fireErrorAfterVersionChangeCompletion(); 433 else 434 m_openDBRequest->fireSuccessAfterVersionChangeCommit(); 423 m_openDBRequest->versionChangeTransactionDidFinish(); 424 425 if (event.type() == eventNames().completeEvent) { 426 if (m_database->isClosingOrClosed()) 427 m_openDBRequest->fireErrorAfterVersionChangeCompletion(); 428 else 429 m_openDBRequest->fireSuccessAfterVersionChangeCommit(); 430 } 435 431 } 436 432
Note:
See TracChangeset
for help on using the changeset viewer.