diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 01:07:18 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 01:07:18 +0000 |
commit | cd50d86f769ca5f637bf8a1692f6b752ef7b84f0 (patch) | |
tree | ef8a9d0033538ec6a2094f4bffa393be40ad1b9d /mojo | |
parent | 4ee779517b62046da41ddca7fa4c4a14f4735386 (diff) | |
download | chromium_src-cd50d86f769ca5f637bf8a1692f6b752ef7b84f0.zip chromium_src-cd50d86f769ca5f637bf8a1692f6b752ef7b84f0.tar.gz chromium_src-cd50d86f769ca5f637bf8a1692f6b752ef7b84f0.tar.bz2 |
Mojo: Move comment (per TODO).
TBR=darin@chromium.org
Review URL: https://codereview.chromium.org/188133002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/system/core_impl.cc | 7 | ||||
-rw-r--r-- | mojo/system/core_impl.h | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/mojo/system/core_impl.cc b/mojo/system/core_impl.cc index 859617a..7477f91 100644 --- a/mojo/system/core_impl.cc +++ b/mojo/system/core_impl.cc @@ -186,6 +186,13 @@ MojoResult CoreImpl::CreateMessagePipe(MojoHandle* message_pipe_handle0, return MOJO_RESULT_OK; } +// Implementation note: To properly cancel waiters and avoid other races, this +// does not transfer dispatchers from one handle to another, even when sending a +// message in-process. Instead, it must transfer the "contents" of the +// dispatcher to a new dispatcher, and then close the old dispatcher. If this +// isn't done, in the in-process case, calls on the old handle may complete +// after the the message has been received and a new handle created (and +// possibly even after calls have been made on the new handle). MojoResult CoreImpl::WriteMessage(MojoHandle message_pipe_handle, const void* bytes, uint32_t num_bytes, diff --git a/mojo/system/core_impl.h b/mojo/system/core_impl.h index 06e7345..7e22694 100644 --- a/mojo/system/core_impl.h +++ b/mojo/system/core_impl.h @@ -117,15 +117,6 @@ class MOJO_SYSTEM_IMPL_EXPORT CoreImpl : public Core { // handle is marked busy. If it is, it fails (with |MOJO_RESULT_BUSY|). This // prevents |WriteMessage()| from sending a handle that has been closed (or // learning about this too late). - // - // TODO(vtl): Move this implementation note. - // To properly cancel waiters and avoid other races, |WriteMessage()| does not - // transfer dispatchers from one handle to another, even when sending a - // message in-process. Instead, it must transfer the "contents" of the - // dispatcher to a new dispatcher, and then close the old dispatcher. If this - // isn't done, in the in-process case, calls on the old handle may complete - // after the the message has been received and a new handle created (and - // possibly even after calls have been made on the new handle). struct HandleTableEntry { HandleTableEntry(); explicit HandleTableEntry(const scoped_refptr<Dispatcher>& dispatcher); |