diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 17:56:06 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-22 17:56:06 +0000 |
commit | 4c3cd741778f0df792d6b8f4acbacd6675784aa8 (patch) | |
tree | 70211d12b189d67e9345244397262f3cefd21a6c /chrome/browser/chrome_thread.cc | |
parent | 47e3a17c0dd7898eda6622d0bafe189b75db3c83 (diff) | |
download | chromium_src-4c3cd741778f0df792d6b8f4acbacd6675784aa8.zip chromium_src-4c3cd741778f0df792d6b8f4acbacd6675784aa8.tar.gz chromium_src-4c3cd741778f0df792d6b8f4acbacd6675784aa8.tar.bz2 |
Linux: move X operations from the IO to UI2 thread.
(r14075 take two)
Currently we perform several X operations on the IO thread including
geometry and clipboard work. This is causing races inside Xlib and
crashing the browser.
These are the result of synchronous calls from the renderer, so we
cannot route these requests to the UI thread without risking deadlock.
Thus we introduce the UI2 thread. This thread has a second connection
to the X server and can perform X operations safely the without UI
thread.
Work remains to be done:
Since we still have the hack where we pass GtkWidget pointers into the
renderer and back, we still have to access these structures from the
IO and UI2 threads. This still needs to be fixed, but this is not the
patch for it.
Also, not all the X calls from the IO thread have been moved over in
this patch; just a few small ones.
http://codereview.chromium.org/67145
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_thread.cc')
-rw-r--r-- | chrome/browser/chrome_thread.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/chrome_thread.cc b/chrome/browser/chrome_thread.cc index 9c0d10c..762ae76 100644 --- a/chrome/browser/chrome_thread.cc +++ b/chrome/browser/chrome_thread.cc @@ -9,6 +9,10 @@ static const char* chrome_thread_names[ChromeThread::ID_COUNT] = { "Chrome_IOThread", // IO "Chrome_FileThread", // FILE "Chrome_DBThread", // DB + "Chrome_HistoryThread", // HISTORY +#if defined(OS_LINUX) + "Chrome_Background_X11Thread", // BACKGROUND_X11 +#endif }; Lock ChromeThread::lock_; @@ -17,6 +21,10 @@ ChromeThread* ChromeThread::chrome_threads_[ID_COUNT] = { NULL, // IO NULL, // FILE NULL, // DB + NULL, // HISTORY +#if defined(OS_LINUX) + NULL, // BACKGROUND_X11 +#endif }; ChromeThread::ChromeThread(ChromeThread::ID identifier) |