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

Unified Diff: chrome/browser/metrics/thread_watcher.cc

Issue 10700080: Prevent code folding in the ThreadWatcher ThreadUnresponsive_X functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: __LINE__ Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/thread_watcher.cc
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
index d2b62532fed08b67b75d19ed4de906b850cba280..cfa810294787ddf8a8793ea9af0ea3a2f8cd019d 100644
--- a/chrome/browser/metrics/thread_watcher.cc
+++ b/chrome/browser/metrics/thread_watcher.cc
@@ -39,36 +39,40 @@ namespace {
MSVC_PUSH_DISABLE_WARNING(4748)
#endif
+int* NullPointer() {
+ return reinterpret_cast<int*>(NULL);
+}
+
void ThreadUnresponsive_UI() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
void ThreadUnresponsive_DB() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
void ThreadUnresponsive_WEBKIT() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
void ThreadUnresponsive_FILE() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
void ThreadUnresponsive_FILE_USER_BLOCKING() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
void ThreadUnresponsive_PROCESS_LAUNCHER() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
void ThreadUnresponsive_CACHE() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
void ThreadUnresponsive_IO() {
- CHECK(false);
+ *NullPointer() = __LINE__;
}
#if defined(COMPILER_MSVC)
@@ -104,7 +108,7 @@ void CrashBecauseThreadWasUnresponsive(BrowserThread::ID thread_id) {
// should warn if our switch becomes outdated.
}
- CHECK(false); // Shouldn't be reached.
+ CHECK(false) << "Unknown thread was unresponsive."; // Shouldn't be reached.
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698