[Webkit-unassigned] [Bug 31206] Database tries to deref Document on the Database thread
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 9 08:08:29 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31206
Kevin Watters <kevinwatters at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #42663|0 |1
is obsolete| |
Attachment #42753| |review?, commit-queue?
Flag| |
--- Comment #7 from Kevin Watters <kevinwatters at gmail.com> 2009-11-09 08:08:28 PDT ---
Created an attachment (id=42753)
--> (https://bugs.webkit.org/attachment.cgi?id=42753)
patch with improved comment
I attached a patch fixing the comment and flagged it for the commit queue.
Eric: as for creating a new RefPtr subclass that handles destruction on a
specific thread--I wasn't confident enough that I could subclass RefPtr 100%
correctly. Luckily the other RefPtr members in Database (m_securityOrigin and
m_databaseAuthorizer) point to ThreadSafeShared subclasses, so I think
m_document is the only member that had this problem.
Maybe a good interim solution would be a convenience function in MainThread.h
like the following:
template <typename T>
static void deref(void* obj)
{
static_cast<T*>(obj)->deref();
}
template <typename T>
static void derefOnMainThread(RefPtr<T>& ref)
{
callOnMainThread(deref<T>, ref.release().releaseRef());
}
Then we could just "derefOnMainThread(m_document)" from ~Database. Let me know
if I should create a patch for this.
--
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