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

Unified Diff: base/synchronization/condition_variable_win.cc

Issue 10151009: Disallow UI/IO thread blocking on any other thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | « base/synchronization/condition_variable_posix.cc ('k') | base/synchronization/waitable_event_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/condition_variable_win.cc
===================================================================
--- base/synchronization/condition_variable_win.cc (revision 133458)
+++ base/synchronization/condition_variable_win.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/synchronization/lock.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time.h"
namespace {
@@ -94,6 +95,7 @@
}
void WinVistaCondVar::TimedWait(const TimeDelta& max_time) {
+ base::ThreadRestrictions::AssertWaitAllowed();
DWORD timeout = static_cast<DWORD>(max_time.InMilliseconds());
CRITICAL_SECTION* cs = user_lock_.lock_.os_lock();
@@ -240,6 +242,7 @@
}
void WinXPCondVar::TimedWait(const TimeDelta& max_time) {
+ base::ThreadRestrictions::AssertWaitAllowed();
Event* waiting_event;
HANDLE handle;
{
« no previous file with comments | « base/synchronization/condition_variable_posix.cc ('k') | base/synchronization/waitable_event_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698