summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process.h
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 17:56:06 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 17:56:06 +0000
commit4c3cd741778f0df792d6b8f4acbacd6675784aa8 (patch)
tree70211d12b189d67e9345244397262f3cefd21a6c /chrome/browser/browser_process.h
parent47e3a17c0dd7898eda6622d0bafe189b75db3c83 (diff)
downloadchromium_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/browser_process.h')
-rw-r--r--chrome/browser/browser_process.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index d5758f0..15ead3e 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -96,6 +96,15 @@ class BrowserProcess {
// database. History has its own thread since it has much higher traffic.
virtual base::Thread* db_thread() = 0;
+#if defined(OS_LINUX)
+ // Returns the thread that is used to process UI requests in cases were
+ // we can't route the request to the UI thread. Note that this thread
+ // should only be used by the IO thread and this method is only safe to call
+ // from the UI thread so, if you've ended up here, something has gone wrong.
+ // This method is only included for uniformity.
+ virtual base::Thread* background_x11_thread() = 0;
+#endif
+
virtual sandbox::BrokerServices* broker_services() = 0;
virtual IconManager* icon_manager() = 0;