Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 17741010: Make ChildThread::current() and ChildProcess::current() only work on the main thread of the child... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and also fix gpu single process case Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host.cc
===================================================================
--- content/browser/gpu/gpu_process_host.cc (revision 208740)
+++ content/browser/gpu/gpu_process_host.cc (working copy)
@@ -285,8 +285,7 @@
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 @@
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);
};

Powered by Google App Engine
This is Rietveld 408576698