Cleanup pending transaction queue in Database.
https://bugs.webkit.org/show_bug.cgi?id=75048
Patch by Hao Zheng <zhenghao@chromium.org> on 2012-02-14
Reviewed by David Levin.
Source/WebCore:
Each SQLTransaction has 3 SQLCallbackWrappers, and each of them
holds a ref to WorkerContext. As a result, if the worker thread is
stopped before all SQLTransactions are finished, the ASSERT of
m_workerContext->hasOneRef() in WorkerThread::workerThread() would fail.
No new tests.
REGRESSION(r103429) fast/workers/storage/use-same-database-in-page-and-workers.html asserts
* storage/Database.cpp:
(WebCore::Database::close): Cleanup pending transaction queue in close().
* storage/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
(SafeReleaseTask): Make SafeReleaseTask a cleanup task, which is
necessary because at the time of SafeReleaseTask is performed,
WorkerRunLoop has been terminated and only runs cleanup tasks.
(WebCore::SQLCallbackWrapper::SafeReleaseTask::create):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
LayoutTests:
As crash is fixed, trun BUGWK75048 into BUGWK75111, so that we can
close 75048 and fix the timeout in 75111 for both DEBUG and RELEASE.
REGRESSION(r103429) fast/workers/storage/use-same-database-in-page-and-workers.html asserts
* platform/chromium/test_expectations.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107784
268f45cc-cd09-0410-ab3c-
d52691b4dbfc