summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_thread_impl.h
diff options
context:
space:
mode:
authorrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 21:21:23 +0000
committerrtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-23 21:21:23 +0000
commite0b87aa21c53a58a12279ffaff1d93309cc77b28 (patch)
tree9a65444d7471ad43169f7146f0e38cfce48751d3 /content/browser/browser_thread_impl.h
parent7e7a004713c446d6b888f75901f73176a0282982 (diff)
downloadchromium_src-e0b87aa21c53a58a12279ffaff1d93309cc77b28.zip
chromium_src-e0b87aa21c53a58a12279ffaff1d93309cc77b28.tar.gz
chromium_src-e0b87aa21c53a58a12279ffaff1d93309cc77b28.tar.bz2
Added unique function names (IOThreadRun, DBThreadRun, etc)
which make it possible to tell the thread name in crash dumps from the call stack. Added a volatile automatic variable to avoid global optimizers optimizing the function. This change would help us to triage ThreadWatcher crashes for IO thread. It would also help in debugging crashes. R=sky, jar Review URL: https://chromiumcodereview.appspot.com/10796079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_thread_impl.h')
-rw-r--r--content/browser/browser_thread_impl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/content/browser/browser_thread_impl.h b/content/browser/browser_thread_impl.h
index eb883ed..9eaeb68 100644
--- a/content/browser/browser_thread_impl.h
+++ b/content/browser/browser_thread_impl.h
@@ -27,6 +27,7 @@ class CONTENT_EXPORT BrowserThreadImpl
protected:
virtual void Init() OVERRIDE;
+ virtual void Run(MessageLoop* message_loop) OVERRIDE;
virtual void CleanUp() OVERRIDE;
private:
@@ -35,6 +36,17 @@ class CONTENT_EXPORT BrowserThreadImpl
// the API cleaner. Therefore make BrowserThread a friend class.
friend class BrowserThread;
+ // The following are unique function names that makes it possible to tell
+ // the thread id from the callstack alone in crash dumps.
+ void UIThreadRun(MessageLoop* message_loop);
+ void DBThreadRun(MessageLoop* message_loop);
+ void WebKitThreadRun(MessageLoop* message_loop);
+ void FileThreadRun(MessageLoop* message_loop);
+ void FileUserBlockingThreadRun(MessageLoop* message_loop);
+ void ProcessLauncherThreadRun(MessageLoop* message_loop);
+ void CacheThreadRun(MessageLoop* message_loop);
+ void IOThreadRun(MessageLoop* message_loop);
+
static bool PostTaskHelper(
BrowserThread::ID identifier,
const tracked_objects::Location& from_here,