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

Side by Side Diff: chrome/gpu/gpu_main.cc

Issue 5301007: Fixed null dereference in GPU watchdog termination code.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/gpu/gpu_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "app/gfx/gl/gl_context.h" 8 #include "app/gfx/gl/gl_context.h"
9 #include "app/gfx/gl/gl_implementation.h" 9 #include "app/gfx/gl/gl_implementation.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Disable the watchdog in debug builds because they tend to only be run by 123 // Disable the watchdog in debug builds because they tend to only be run by
124 // developers who will not appreciate the watchdog killing the GPU process. 124 // developers who will not appreciate the watchdog killing the GPU process.
125 #ifndef NDEBUG 125 #ifndef NDEBUG
126 enable_watchdog = false; 126 enable_watchdog = false;
127 #endif 127 #endif
128 128
129 // Start the GPU watchdog only after anything that is expected to be time 129 // Start the GPU watchdog only after anything that is expected to be time
130 // consuming has completed, otherwise the process is liable to be aborted. 130 // consuming has completed, otherwise the process is liable to be aborted.
131 scoped_refptr<GpuWatchdogThread> watchdog_thread; 131 scoped_refptr<GpuWatchdogThread> watchdog_thread;
132 if (enable_watchdog) { 132 if (enable_watchdog) {
133 watchdog_thread = new GpuWatchdogThread(MessageLoop::current(), 133 watchdog_thread = new GpuWatchdogThread(watchdog_timeout * 1000);
134 watchdog_timeout * 1000);
135 watchdog_thread->Start(); 134 watchdog_thread->Start();
136 } 135 }
137 136
138 main_message_loop.Run(); 137 main_message_loop.Run();
139 138
140 if (enable_watchdog) 139 if (enable_watchdog)
141 watchdog_thread->Stop(); 140 watchdog_thread->Stop();
142 141
143 return 0; 142 return 0;
144 } 143 }
OLDNEW
« no previous file with comments | « no previous file | chrome/gpu/gpu_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698