|
Lines 584-589
void IDBTransaction::enqueueEvent(Ref<Event>&& event)
a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp_sec1
|
| 584 |
if (!scriptExecutionContext() || isContextStopped()) |
584 |
if (!scriptExecutionContext() || isContextStopped()) |
| 585 |
return; |
585 |
return; |
| 586 |
|
586 |
|
|
|
587 |
m_abortOrCommitEvent = event.ptr(); |
| 587 |
queueTaskToDispatchEvent(*this, TaskSource::DatabaseAccess, WTFMove(event)); |
588 |
queueTaskToDispatchEvent(*this, TaskSource::DatabaseAccess, WTFMove(event)); |
| 588 |
} |
589 |
} |
| 589 |
|
590 |
|
|
Lines 594-608
void IDBTransaction::dispatchEvent(Event& event)
a/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp_sec2
|
| 594 |
ASSERT(canCurrentThreadAccessThreadLocalData(m_database->originThread())); |
595 |
ASSERT(canCurrentThreadAccessThreadLocalData(m_database->originThread())); |
| 595 |
ASSERT(scriptExecutionContext()); |
596 |
ASSERT(scriptExecutionContext()); |
| 596 |
ASSERT(!isContextStopped()); |
597 |
ASSERT(!isContextStopped()); |
| 597 |
ASSERT(event.type() == eventNames().completeEvent || event.type() == eventNames().abortEvent); |
598 |
|
| 598 |
|
599 |
|
| 599 |
auto protectedThis = makeRef(*this); |
600 |
auto protectedThis = makeRef(*this); |
| 600 |
|
601 |
|
| 601 |
EventDispatcher::dispatchEvent({ this, m_database.ptr() }, event); |
602 |
EventDispatcher::dispatchEvent({ this, m_database.ptr() }, event); |
|
|
603 |
|
| 604 |
if (m_abortOrCommitEvent != &event) |
| 605 |
return; |
| 606 |
|
| 607 |
ASSERT(event.type() == eventNames().completeEvent || event.type() == eventNames().abortEvent); |
| 602 |
m_didDispatchAbortOrCommit = true; |
608 |
m_didDispatchAbortOrCommit = true; |
| 603 |
|
609 |
|
| 604 |
if (isVersionChange()) { |
610 |
if (isVersionChange()) { |
| 605 |
ASSERT(m_openDBRequest); |
|
|
| 606 |
m_openDBRequest->versionChangeTransactionDidFinish(); |
611 |
m_openDBRequest->versionChangeTransactionDidFinish(); |
| 607 |
|
612 |
|
| 608 |
if (event.type() == eventNames().completeEvent) { |
613 |
if (event.type() == eventNames().completeEvent) { |