Changeset 235410 in webkit
- Timestamp:
- Aug 27, 2018 4:41:11 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r235409 r235410 1 2018-08-27 Youenn Fablet <youenn@apple.com> 2 3 Various IndexDB tests abandon documents 4 https://bugs.webkit.org/show_bug.cgi?id=188728 5 <rdar://problem/43651095> 6 7 Reviewed by Alex Christensen. 8 9 * http/tests/IndexedDB/collect-IDB-objects.https-expected.txt: Added. 10 * http/tests/IndexedDB/collect-IDB-objects.https.html: Added. 11 * http/tests/IndexedDB/resources/myidbframe.htm: Added. 12 * http/tests/IndexedDB/resources/support.js: Added. 13 1 14 2018-08-27 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r235408 r235410 1 2018-08-27 Youenn Fablet <youenn@apple.com> 2 3 Various IndexDB tests abandon documents 4 https://bugs.webkit.org/show_bug.cgi?id=188728 5 <rdar://problem/43651095> 6 7 Reviewed by Alex Christensen. 8 9 Some IDB objects implement hasPendingActivity but there are some possibilities that they continue returning true after being stopped. 10 This is the case for requests that get stopped while still waiting for some pending activity. 11 This is also the case for requests that emits upgradeneeded or blocked events. 12 13 Enforce that these objects return false to hasPendingActivity once being stopped. 14 This ensures that they can be garbage collected once their context is preparing for destruction like in Document::prepareForDestruction. 15 16 Test: http/tests/IndexedDB/collect-IDB-objects.https.html 17 18 * Modules/indexeddb/IDBIndex.cpp: 19 (WebCore::IDBIndex::hasPendingActivity const): 20 * Modules/indexeddb/IDBObjectStore.cpp: 21 (WebCore::IDBObjectStore::hasPendingActivity const): 22 * Modules/indexeddb/IDBRequest.cpp: 23 (WebCore::IDBRequest::hasPendingActivity const): 24 (WebCore::IDBRequest::enqueueEvent): 25 * Modules/indexeddb/IDBTransaction.cpp: 26 (WebCore::IDBTransaction::notifyDidAbort): 27 In case the context is stopped, IDBTransaction should not ask IDBRequest to fire an event. 28 1 29 2018-08-27 Simon Fraser <simon.fraser@apple.com> 2 30 -
trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp
r233122 r235410 70 70 bool IDBIndex::hasPendingActivity() const 71 71 { 72 return !m_objectStore.transaction().isFinished();72 return m_objectStore.transaction().hasPendingActivity(); 73 73 } 74 74 -
trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
r233122 r235410 83 83 bool IDBObjectStore::hasPendingActivity() const 84 84 { 85 return !m_transaction.isFinished();85 return m_transaction.hasPendingActivity(); 86 86 } 87 87 -
trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp
r235344 r235410 262 262 { 263 263 ASSERT(&originThread() == &Thread::current() || mayBeGCThread()); 264 return m_hasPendingActivity;264 return !m_contextStopped && m_hasPendingActivity; 265 265 } 266 266 … … 285 285 { 286 286 ASSERT(&originThread() == &Thread::current()); 287 if ( !scriptExecutionContext() ||m_contextStopped)287 if (m_contextStopped) 288 288 return; 289 289 -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
r235344 r235410 552 552 fireOnAbort(); 553 553 554 if (isVersionChange() ) {554 if (isVersionChange() && !m_contextStopped) { 555 555 ASSERT(m_openDBRequest); 556 556 m_openDBRequest->fireErrorAfterVersionChangeCompletion();
Note: See TracChangeset
for help on using the changeset viewer.