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

Unified Diff: mojo/system/core.h

Issue 277343004: Mojo: Delete some old, unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | mojo/system/core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/core.h
diff --git a/mojo/system/core.h b/mojo/system/core.h
index 5d3a1cf7f2cb046a7861fc0fb7ab0c9d13a76d58..7bce6e39de3dbd0b1f0dba6c9d814c33a7830385 100644
--- a/mojo/system/core.h
+++ b/mojo/system/core.h
@@ -93,31 +93,6 @@ class MOJO_SYSTEM_IMPL_EXPORT Core {
private:
friend bool internal::ShutdownCheckNoLeaks(Core*);
- // The |busy| member is used only to deal with functions (in particular
- // |WriteMessage()|) that want to hold on to a dispatcher and later remove it
- // from the handle table, without holding on to the handle table lock.
- //
- // For example, if |WriteMessage()| is called with a handle to be sent, (under
- // the handle table lock) it must first check that that handle is not busy (if
- // it is busy, then it fails with |MOJO_RESULT_BUSY|) and then marks it as
- // busy. To avoid deadlock, it should also try to acquire the locks for all
- // the dispatchers for the handles that it is sending (and fail with
- // |MOJO_RESULT_BUSY| if the attempt fails). At this point, it can release the
- // handle table lock.
- //
- // If |Close()| is simultaneously called on that handle, it too checks if the
- // 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).
- struct HandleTableEntry {
- HandleTableEntry();
- explicit HandleTableEntry(const scoped_refptr<Dispatcher>& dispatcher);
- ~HandleTableEntry();
-
- scoped_refptr<Dispatcher> dispatcher;
- bool busy;
- };
- typedef base::hash_map<MojoHandle, HandleTableEntry> HandleTableMap;
// Looks up the dispatcher for the given handle. Returns null if the handle is
// invalid.
« no previous file with comments | « no previous file | mojo/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698