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

Unified Diff: cc/base/completion_event.h

Issue 2790173005: cc: Dump scheduler and tile manager state when commit is blocked. (Closed)
Patch Set: vmpstr review Created 3 years, 8 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 | cc/trees/proxy_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/completion_event.h
diff --git a/cc/base/completion_event.h b/cc/base/completion_event.h
index edee0b78bf0e7bff28b07b878faae6a2ea858cce..0c620db4e72693a19993a16e82f247eec844fb5e 100644
--- a/cc/base/completion_event.h
+++ b/cc/base/completion_event.h
@@ -43,12 +43,18 @@ class CompletionEvent {
event_.Wait();
}
- void TimedWait(const base::TimeDelta& max_time) {
+ bool TimedWait(const base::TimeDelta& max_time) {
#if DCHECK_IS_ON()
DCHECK(!waited_);
waited_ = true;
#endif
- event_.TimedWait(max_time);
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
+ if (event_.TimedWait(max_time))
+ return true;
+#if DCHECK_IS_ON()
+ waited_ = false;
+#endif
+ return false;
}
bool IsSignaled() { return event_.IsSignaled(); }
« no previous file with comments | « no previous file | cc/trees/proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698