| Index: mojo/edk/system/core.cc
|
| diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
|
| index 80c3d367ba16858731d2c0527c4c073a7faee245..cde236ce19cd3ee770928685757d4feececd3385 100644
|
| --- a/mojo/edk/system/core.cc
|
| +++ b/mojo/edk/system/core.cc
|
| @@ -97,6 +97,21 @@ scoped_refptr<Dispatcher> Core::GetDispatcher(MojoHandle handle) {
|
| return handle_table_.GetDispatcher(handle);
|
| }
|
|
|
| +scoped_refptr<Dispatcher> Core::PopDispatcher(MojoHandle handle) {
|
| + if (handle == MOJO_HANDLE_INVALID)
|
| + return nullptr;
|
| +
|
| + scoped_refptr<Dispatcher> dispatcher;
|
| + {
|
| + base::AutoLock locker(handle_table_lock_);
|
| + MojoResult result =
|
| + handle_table_.GetAndRemoveDispatcher(handle, &dispatcher);
|
| + if (result != MOJO_RESULT_OK)
|
| + return nullptr;
|
| + }
|
| + return dispatcher;
|
| +}
|
| +
|
| MojoResult Core::AsyncWait(MojoHandle handle,
|
| MojoHandleSignals signals,
|
| const base::Callback<void(MojoResult)>& callback) {
|
|
|