| Index: mojo/system/core_impl.cc
|
| diff --git a/mojo/system/core_impl.cc b/mojo/system/core_impl.cc
|
| index f3563211e132a3396dc25f00b1d6c76cbe5ee5ae..79d7ea36b4bc58fb8b8dd61223f53771faa4dd3b 100644
|
| --- a/mojo/system/core_impl.cc
|
| +++ b/mojo/system/core_impl.cc
|
| @@ -85,9 +85,19 @@ CoreImpl::HandleTableEntry::~HandleTableEntry() {
|
| DCHECK(!busy);
|
| }
|
|
|
| -// static
|
| -void CoreImpl::Init() {
|
| - Core::Init(new CoreImpl());
|
| +CoreImpl::CoreImpl()
|
| + : next_handle_(MOJO_HANDLE_INVALID + 1) {
|
| +}
|
| +
|
| +CoreImpl::~CoreImpl() {
|
| + // This should usually not be reached (the singleton lives forever), except in
|
| + // tests.
|
| +}
|
| +
|
| +MojoHandle CoreImpl::AddDispatcher(
|
| + const scoped_refptr<Dispatcher>& dispatcher) {
|
| + base::AutoLock locker(handle_table_lock_);
|
| + return AddDispatcherNoLock(dispatcher);
|
| }
|
|
|
| MojoTimeTicks CoreImpl::GetTimeTicksNow() {
|
| @@ -471,15 +481,6 @@ MojoResult CoreImpl::EndReadData(MojoHandle data_pipe_consumer_handle,
|
| return dispatcher->EndReadData(num_bytes_read);
|
| }
|
|
|
| -CoreImpl::CoreImpl()
|
| - : next_handle_(MOJO_HANDLE_INVALID + 1) {
|
| -}
|
| -
|
| -CoreImpl::~CoreImpl() {
|
| - // This should usually not be reached (the singleton lives forever), except in
|
| - // tests.
|
| -}
|
| -
|
| scoped_refptr<Dispatcher> CoreImpl::GetDispatcher(MojoHandle handle) {
|
| if (handle == MOJO_HANDLE_INVALID)
|
| return NULL;
|
|
|