Make the context that was passed to the ThreadFunction accessible.
https://bugs.webkit.org/show_bug.cgi?id=35379 Patch by Jochen Eisinger <firstname.lastname@example.org> on 2010-02-25 Reviewed by Jeremy Orlow. When a database is opened, right now you don't have any context from where it is opened. The problem is that the actual calls that open a database go through the sqlite3 vfs layer, so there's no easy way to pass this function down to to platform/sql/chromium/SQLFileSystemChromium*.cpp This patch will allow you to get from anywhere within webkit a pointer to the Thread object that actually created the thread you're currently on (in case of the database, this can be either a thread forked of from the main thread or from a worker thread), and query the object for context information. * wtf/Threading.h: * wtf/ThreadingNone.cpp: (WTF::threadContext): * wtf/ThreadingPthreads.cpp: (WTF::): (WTF::identifierByPthreadHandle): (WTF::establishIdentifierForPthreadHandle): (WTF::pthreadHandleForIdentifier): (WTF::contextForIdentifier): (WTF::createThreadInternal): (WTF::currentThread): (WTF::threadContext): * wtf/ThreadingWin.cpp: (WTF::): (WTF::threadMap): (WTF::storeThreadHandleByIdentifier): (WTF::threadHandleForIdentifier): (WTF::contextForIdentifier): (WTF::createThreadInternal): (WTF::threadContext): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Showing with 96 additions and 14 deletions