diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-26 20:39:01 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-26 20:39:01 +0000 |
commit | 57cf978844f365885c897eaa748573822796af32 (patch) | |
tree | a4a33227a80e6feb65bca2cd683f9c256261e098 /content/browser | |
parent | bce6e4be0debf38250ca05093ac423ffc45d3024 (diff) | |
download | chromium_src-57cf978844f365885c897eaa748573822796af32.zip chromium_src-57cf978844f365885c897eaa748573822796af32.tar.gz chromium_src-57cf978844f365885c897eaa748573822796af32.tar.bz2 |
Make ChildThread::current() and ChildProcess::current() only work on the main thread of the child process. In single-process mode, there would be multiple ChildThread objects each using thread local storage to get their value.
Remove ChildThread::IsWebFrameValid since it's not used anymore.
BUG=246884
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/17741010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/gpu/gpu_process_host.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc index 0f7a214..4f4e71b 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -285,8 +285,7 @@ class GpuMainThread : public base::Thread { explicit GpuMainThread(const std::string& channel_id) : base::Thread("Chrome_InProcGpuThread"), channel_id_(channel_id), - gpu_process_(NULL), - child_thread_(NULL) { + gpu_process_(NULL) { } virtual ~GpuMainThread() { @@ -295,27 +294,20 @@ class GpuMainThread : public base::Thread { protected: virtual void Init() OVERRIDE { - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) { - child_thread_ = new GpuChildThread(channel_id_); - } else { - gpu_process_ = new GpuProcess(); - // The process object takes ownership of the thread object, so do not - // save and delete the pointer. - gpu_process_->set_main_thread(new GpuChildThread(channel_id_)); - } + gpu_process_ = new GpuProcess(); + // The process object takes ownership of the thread object, so do not + // save and delete the pointer. + gpu_process_->set_main_thread(new GpuChildThread(channel_id_)); } virtual void CleanUp() OVERRIDE { delete gpu_process_; - if (child_thread_) - delete child_thread_; } private: std::string channel_id_; // Deleted in CleanUp() on the gpu thread, so don't use smart pointers. GpuProcess* gpu_process_; - GpuChildThread* child_thread_; DISALLOW_COPY_AND_ASSIGN(GpuMainThread); }; |