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

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

Issue 2915013006: Add a Mojo MemoryDumpProvider. (Closed)
Patch Set: compile error. Created 3 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
Index: mojo/edk/system/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index c0b8be223c394da3512b18a539240e49d5617492..dfdb377d7b64ac5d7b27205dba73d4584b9cce0d 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -152,7 +152,7 @@ NodeController* Core::GetNodeController() {
}
scoped_refptr<Dispatcher> Core::GetDispatcher(MojoHandle handle) {
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
return handles_.GetDispatcher(handle);
}
@@ -208,7 +208,7 @@ void Core::SetMachPortProvider(base::PortProvider* port_provider) {
}
MojoHandle Core::AddDispatcher(scoped_refptr<Dispatcher> dispatcher) {
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
return handles_.AddDispatcher(dispatcher);
}
@@ -217,7 +217,7 @@ bool Core::AddDispatchersFromTransit(
MojoHandle* handles) {
bool failed = false;
{
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
if (!handles_.AddDispatchersFromTransit(dispatchers, handles))
failed = true;
}
@@ -243,7 +243,7 @@ MojoResult Core::CreatePlatformHandleWrapper(
MojoResult Core::PassWrappedPlatformHandle(
MojoHandle wrapper_handle,
ScopedPlatformHandle* platform_handle) {
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
scoped_refptr<Dispatcher> d;
MojoResult result = handles_.GetAndRemoveDispatcher(wrapper_handle, &d);
if (result != MOJO_RESULT_OK)
@@ -294,7 +294,7 @@ MojoResult Core::PassSharedMemoryHandle(
scoped_refptr<Dispatcher> dispatcher;
MojoResult result = MOJO_RESULT_OK;
{
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
// Get the dispatcher and check it before removing it from the handle table
// to ensure that the dispatcher is of the correct type. This ensures we
// don't close and remove the wrong type of dispatcher.
@@ -360,7 +360,7 @@ MojoResult Core::Close(MojoHandle handle) {
RequestContext request_context;
scoped_refptr<Dispatcher> dispatcher;
{
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
MojoResult rv = handles_.GetAndRemoveDispatcher(handle, &dispatcher);
if (rv != MOJO_RESULT_OK)
return rv;
@@ -452,7 +452,7 @@ MojoResult Core::AllocMessage(uint32_t num_bytes,
std::vector<Dispatcher::DispatcherInTransit> dispatchers;
{
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
MojoResult rv = handles_.BeginTransit(handles, num_handles, &dispatchers);
if (rv != MOJO_RESULT_OK) {
handles_.CancelTransit(dispatchers);
@@ -466,7 +466,7 @@ MojoResult Core::AllocMessage(uint32_t num_bytes,
&msg, num_bytes, dispatchers.data(), num_handles);
{
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
if (rv == MOJO_RESULT_OK) {
handles_.CompleteTransitAndClose(dispatchers);
*message = reinterpret_cast<MojoMessageHandle>(msg.release());
@@ -531,7 +531,7 @@ MojoResult Core::CreateMessagePipe(
scoped_refptr<Dispatcher> unused;
unused->Close();
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
handles_.GetAndRemoveDispatcher(*message_pipe_handle0, &unused);
return MOJO_RESULT_RESOURCE_EXHAUSTED;
}
@@ -631,7 +631,7 @@ MojoResult Core::FuseMessagePipes(MojoHandle handle0, MojoHandle handle1) {
bool valid_handles = true;
{
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
MojoResult result0 = handles_.GetAndRemoveDispatcher(handle0, &dispatcher0);
MojoResult result1 = handles_.GetAndRemoveDispatcher(handle1, &dispatcher1);
if (result0 != MOJO_RESULT_OK || result1 != MOJO_RESULT_OK ||
@@ -727,7 +727,7 @@ MojoResult Core::CreateDataPipe(
*data_pipe_consumer_handle == MOJO_HANDLE_INVALID) {
if (*data_pipe_producer_handle != MOJO_HANDLE_INVALID) {
scoped_refptr<Dispatcher> unused;
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
handles_.GetAndRemoveDispatcher(*data_pipe_producer_handle, &unused);
}
producer->Close();
@@ -966,7 +966,7 @@ MojoResult Core::UnwrapPlatformSharedBufferHandle(
scoped_refptr<Dispatcher> dispatcher;
MojoResult result = MOJO_RESULT_OK;
{
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
result = handles_.GetAndRemoveDispatcher(mojo_handle, &dispatcher);
if (result != MOJO_RESULT_OK)
return result;
@@ -997,7 +997,7 @@ MojoResult Core::UnwrapPlatformSharedBufferHandle(
}
void Core::GetActiveHandlesForTest(std::vector<MojoHandle>* handles) {
- base::AutoLock lock(handles_lock_);
+ base::AutoLock lock(handles_.GetLock());
handles_.GetActiveHandlesForTest(handles);
}

Powered by Google App Engine
This is Rietveld 408576698