Changeset 250732 in webkit
- Timestamp:
- Oct 4, 2019 11:26:19 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r250731 r250732 1 2019-10-04 Sihui Liu <sihui_liu@apple.com> 2 3 Layout Test imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html is a Flaky Failure 4 https://bugs.webkit.org/show_bug.cgi?id=201481 5 <rdar://problem/55046055> 6 7 Reviewed by Alex Christensen. 8 9 We should not schedule timer if we know the timer function will be no-op. 10 11 * Modules/indexeddb/IDBTransaction.cpp: 12 (WebCore::IDBTransaction::removeRequest): 13 (WebCore::IDBTransaction::scheduleOperation): 14 (WebCore::IDBTransaction::trySchedulePendingOperationTimer): 15 (WebCore::IDBTransaction::pendingOperationTimerFired): 16 (WebCore::IDBTransaction::didStart): 17 (WebCore::IDBTransaction::operationCompletedOnClient): 18 (WebCore::IDBTransaction::deactivate): 19 (WebCore::IDBTransaction::schedulePendingOperationTimer): Deleted. 20 * Modules/indexeddb/IDBTransaction.h: 21 1 22 2019-10-04 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
r250531 r250732 384 384 ASSERT(&m_database->originThread() == &Thread::current()); 385 385 m_openRequests.remove(&request); 386 387 trySchedulePendingOperationTimer(); 386 388 } 387 389 … … 395 397 m_transactionOperationMap.set(identifier, WTFMove(operation)); 396 398 397 schedulePendingOperationTimer(); 398 } 399 400 void IDBTransaction::schedulePendingOperationTimer() 401 { 402 ASSERT(&m_database->originThread() == &Thread::current()); 403 404 if (!m_pendingOperationTimer.isActive()) 405 m_pendingOperationTimer.startOneShot(0_s); 406 } 407 408 void IDBTransaction::pendingOperationTimerFired() 409 { 410 LOG(IndexedDB, "IDBTransaction::pendingOperationTimerFired (%p)", this); 399 trySchedulePendingOperationTimer(); 400 } 401 402 void IDBTransaction::trySchedulePendingOperationTimer() 403 { 411 404 ASSERT(&m_database->originThread() == &Thread::current()); 412 405 … … 418 411 if (!m_transactionOperationsInProgressQueue.isEmpty() && !m_transactionOperationsInProgressQueue.last()->nextRequestCanGoToServer()) 419 412 return; 413 414 if (m_pendingTransactionOperationQueue.isEmpty() && (!m_transactionOperationMap.isEmpty() || !m_openRequests.isEmpty() || isFinishedOrFinishing())) 415 return; 416 417 if (!m_pendingOperationTimer.isActive()) 418 m_pendingOperationTimer.startOneShot(0_s); 419 } 420 421 void IDBTransaction::pendingOperationTimerFired() 422 { 423 LOG(IndexedDB, "IDBTransaction::pendingOperationTimerFired (%p)", this); 424 ASSERT(&m_database->originThread() == &Thread::current()); 420 425 421 426 // We want to batch operations together without spinning the runloop for performance, … … 558 563 } 559 564 560 schedulePendingOperationTimer();565 trySchedulePendingOperationTimer(); 561 566 } 562 567 … … 1411 1416 m_transactionOperationsInProgressQueue.removeFirst(); 1412 1417 1413 schedulePendingOperationTimer();1418 trySchedulePendingOperationTimer(); 1414 1419 } 1415 1420 … … 1439 1444 m_state = IndexedDB::TransactionState::Inactive; 1440 1445 1441 schedulePendingOperationTimer();1446 trySchedulePendingOperationTimer(); 1442 1447 } 1443 1448 -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h
r250661 r250732 230 230 void completeCursorRequest(IDBRequest&, const IDBResultData&); 231 231 232 void schedulePendingOperationTimer();232 void trySchedulePendingOperationTimer(); 233 233 void scheduleCompletedOperationTimer(); 234 234
Note: See TracChangeset
for help on using the changeset viewer.