OLD | NEW |
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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
6 #include <windows.h> | 6 #include <windows.h> |
7 #endif | 7 #endif |
8 | 8 |
9 #include "chrome/gpu/gpu_watchdog_thread.h" | 9 #include "chrome/gpu/gpu_watchdog_thread.h" |
10 | 10 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // For minimal developer annoyance, don't keep crashing. | 210 // For minimal developer annoyance, don't keep crashing. |
211 static bool crashed = false; | 211 static bool crashed = false; |
212 if (crashed) | 212 if (crashed) |
213 return; | 213 return; |
214 | 214 |
215 #if defined(OS_WIN) | 215 #if defined(OS_WIN) |
216 if (IsDebuggerPresent()) | 216 if (IsDebuggerPresent()) |
217 return; | 217 return; |
218 #endif | 218 #endif |
219 | 219 |
220 LOG(ERROR) << "The GPU process hung. Restarting after " | 220 LOG(ERROR) << "The GPU process hung. Terminating after " |
221 << timeout_ << " seconds."; | 221 << timeout_ << " ms."; |
222 | 222 |
223 volatile int* null_pointer = NULL; | 223 volatile int* null_pointer = NULL; |
224 *null_pointer = timeout; | 224 *null_pointer = timeout; |
225 | 225 |
226 crashed = true; | 226 crashed = true; |
227 } | 227 } |
OLD | NEW |