Summary: | Expose Database object of currently active task on the database thread | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | jochen | ||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, jorlow | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Other | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
jochen
2010-02-24 07:19:36 PST
Created attachment 49390 [details]
Patch
I can't think of any way to test this using a html file Comment on attachment 49390 [details] Patch Close...but I think it's worth adding an assert. > diff --git a/WebCore/storage/DatabaseThread.cpp b/WebCore/storage/DatabaseThread.cpp > index ec4c6d1..e5a21d1 100644 > --- a/WebCore/storage/DatabaseThread.cpp > +++ b/WebCore/storage/DatabaseThread.cpp > @@ -42,6 +42,7 @@ namespace WebCore { > > DatabaseThread::DatabaseThread() > : m_threadID(0) > + , m_databaseOfCurrentTask(0) > , m_transactionClient(new SQLTransactionClient()) > , m_transactionCoordinator(new SQLTransactionCoordinator()) > , m_cleanupSync(0) > @@ -96,7 +97,9 @@ void* DatabaseThread::databaseThread() > > AutodrainedPool pool; > while (OwnPtr<DatabaseTask> task = m_queue.waitForMessage()) { ASSERT it's 0 first > + m_databaseOfCurrentTask = task->database(); > task->performTask(); > + m_databaseOfCurrentTask = 0; > pool.cycle(); > } Created attachment 49392 [details]
patch
Comment on attachment 49392 [details]
patch
r=me
Comment on attachment 49392 [details] patch Clearing flags on attachment: 49392 Committed r55214: <http://trac.webkit.org/changeset/55214> All reviewed patches have been landed. Closing bug. |