[Webkit-unassigned] [Bug 27966] Race condition in the database code
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 10 16:16:39 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27966
--- Comment #18 from Michael Nordman <michaeln at google.com> 2009-08-10 16:16:37 PDT ---
Getting closer...
85 SQLTransaction::~SQLTransaction()
86 {
87 if (m_lockAcquired) {
88 m_database->transactionCoordinator()->releaseLock(this);
89 m_lockAcquired = false;
90 }
91 }
I'm fairly sure we don't want this call in the SQLTransaction dtor. The object
is refcounted and may be finally released on some thread other than the
DBThread.
It seems like this case should only come into play after the DBThread is
shutdown (as a side effect of the document being closed), otherwise the
transaction step processing should have done the right thing by now. I wonder
if there may be some refinements to make specifically for the dbthread
shutdown. A test case to queue up some xactions and then navigate away from the
page could shed some light on things.
This seems clear, SQLTransactionCoordinator should not start new xactions if
DatabaseThread.terminationRequested() is true.
Maybe we could use another method on the interface for the thread shutdown
case?
AutodrainedPool pool;
while (true) {
RefPtr<DatabaseTask> task;
if (!m_queue.waitForMessage(task))
break;
task->performTask();
pool.cycle();
}
m_transactionCoordiator->shutdown();
The coordinator could take appropiate actions with any remaining items at this
time.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list