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

Unified Diff: mojo/edk/system/wait_set_dispatcher.cc

Issue 2061913002: Don't call the other wait set impl dispatcher methods under mutex either. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 | « mojo/edk/system/wait_set_dispatcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/wait_set_dispatcher.cc
diff --git a/mojo/edk/system/wait_set_dispatcher.cc b/mojo/edk/system/wait_set_dispatcher.cc
index fa8a56ca83d36b1b3341b12c9b98aaa1c878db06..1626f2ff24f5b2106aa7a1d1a022dff2d7b24fbe 100644
--- a/mojo/edk/system/wait_set_dispatcher.cc
+++ b/mojo/edk/system/wait_set_dispatcher.cc
@@ -72,20 +72,24 @@ WaitSetDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock(
return nullptr;
}
-MojoResult WaitSetDispatcher::WaitSetAddImplNoLock(
+MojoResult WaitSetDispatcher::WaitSetAddImpl(
UserPointer<const MojoWaitSetAddOptions> options,
Handle&& handle,
MojoHandleSignals signals,
uint64_t cookie) {
- mutex().AssertHeld();
+ MutexLocker locker(&mutex());
+ if (is_closed_no_lock())
+ return MOJO_RESULT_INVALID_ARGUMENT;
// TODO(vtl)
NOTIMPLEMENTED();
return MOJO_RESULT_UNIMPLEMENTED;
}
-MojoResult WaitSetDispatcher::WaitSetRemoveImplNoLock(uint64_t cookie) {
- mutex().AssertHeld();
+MojoResult WaitSetDispatcher::WaitSetRemoveImpl(uint64_t cookie) {
+ MutexLocker locker(&mutex());
+ if (is_closed_no_lock())
+ return MOJO_RESULT_INVALID_ARGUMENT;
// TODO(vtl)
NOTIMPLEMENTED();
« no previous file with comments | « mojo/edk/system/wait_set_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698