summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-01 04:11:27 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-01 04:11:27 +0000
commit17571649651d6120d076184d69b57995ac35cd5f (patch)
treeba5ec42f82bff0cea4ef31e3f4da76da52fe410f /ipc
parentc7abcfd801f306f116db616ead3e725cd8d89b79 (diff)
downloadchromium_src-17571649651d6120d076184d69b57995ac35cd5f.zip
chromium_src-17571649651d6120d076184d69b57995ac35cd5f.tar.gz
chromium_src-17571649651d6120d076184d69b57995ac35cd5f.tar.bz2
Update ipc/ to use scoped_refptr<T>::get() rather than implicit "operator T*"
Linux fixes BUG=110610 TBR=darin Review URL: https://chromiumcodereview.appspot.com/15703006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_channel_proxy.cc2
-rw-r--r--ipc/ipc_channel_proxy.h4
-rw-r--r--ipc/ipc_forwarding_message_filter.cc2
-rw-r--r--ipc/ipc_sync_channel.cc6
-rw-r--r--ipc/ipc_sync_channel.h2
-rw-r--r--ipc/ipc_sync_message_filter.cc6
6 files changed, 11 insertions, 11 deletions
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index 1048310..0c8f875 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -51,7 +51,7 @@ ChannelProxy::Context::Context(Listener* listener,
ipc_task_runner_(ipc_task_runner),
channel_connected_called_(false),
peer_pid_(base::kNullProcessId) {
- DCHECK(ipc_task_runner_);
+ DCHECK(ipc_task_runner_.get());
}
ChannelProxy::Context::~Context() {
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h
index 6fbbc2a..4d5a7d4 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/ipc/ipc_channel_proxy.h
@@ -197,7 +197,7 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
Context(Listener* listener, base::SingleThreadTaskRunner* ipc_thread);
void ClearIPCTaskRunner();
base::SingleThreadTaskRunner* ipc_task_runner() const {
- return ipc_task_runner_;
+ return ipc_task_runner_.get();
}
const std::string& channel_id() const { return channel_id_; }
@@ -268,7 +268,7 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
base::ProcessId peer_pid_;
};
- Context* context() { return context_; }
+ Context* context() { return context_.get(); }
OutgoingMessageFilter* outgoing_message_filter() {
return outgoing_message_filter_;
diff --git a/ipc/ipc_forwarding_message_filter.cc b/ipc/ipc_forwarding_message_filter.cc
index d886706..342aeb7 100644
--- a/ipc/ipc_forwarding_message_filter.cc
+++ b/ipc/ipc_forwarding_message_filter.cc
@@ -14,7 +14,7 @@ ForwardingMessageFilter::ForwardingMessageFilter(
size_t num_message_ids_to_filter,
base::TaskRunner* target_task_runner)
: target_task_runner_(target_task_runner) {
- DCHECK(target_task_runner_);
+ DCHECK(target_task_runner_.get());
for (size_t i = 0; i < num_message_ids_to_filter; i++)
message_ids_to_filter_.insert(message_ids_to_filter[i]);
}
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 50d48ea..491b72d 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -133,7 +133,7 @@ class SyncChannel::ReceivedSyncMsgQueue :
SyncMessageQueue::iterator iter = message_queue_.begin();
while (iter != message_queue_.end()) {
- if (iter->context == context) {
+ if (iter->context.get() == context) {
delete iter->message;
iter = message_queue_.erase(iter);
message_queue_version_++;
@@ -150,7 +150,7 @@ class SyncChannel::ReceivedSyncMsgQueue :
WaitableEvent* dispatch_event() { return &dispatch_event_; }
base::SingleThreadTaskRunner* listener_task_runner() {
- return listener_task_runner_;
+ return listener_task_runner_.get();
}
// Holds a pointer to the per-thread ReceivedSyncMsgQueue object.
@@ -483,7 +483,7 @@ bool SyncChannel::SendWithTimeout(Message* message, int timeout_ms) {
// Wait for reply, or for any other incoming synchronous messages.
// *this* might get deleted, so only call static functions at this point.
- WaitForReply(context, pump_messages_event);
+ WaitForReply(context.get(), pump_messages_event);
return context->Pop();
}
diff --git a/ipc/ipc_sync_channel.h b/ipc/ipc_sync_channel.h
index 8b66432..46ac910 100644
--- a/ipc/ipc_sync_channel.h
+++ b/ipc/ipc_sync_channel.h
@@ -150,7 +150,7 @@ class IPC_EXPORT SyncChannel : public ChannelProxy {
base::WaitableEvent* shutdown_event() { return shutdown_event_; }
ReceivedSyncMsgQueue* received_sync_msgs() {
- return received_sync_msgs_;
+ return received_sync_msgs_.get();
}
void set_restrict_dispatch_group(int group) {
diff --git a/ipc/ipc_sync_message_filter.cc b/ipc/ipc_sync_message_filter.cc
index b2cd8a7..cd0e72c 100644
--- a/ipc/ipc_sync_message_filter.cc
+++ b/ipc/ipc_sync_message_filter.cc
@@ -24,7 +24,7 @@ SyncMessageFilter::SyncMessageFilter(base::WaitableEvent* shutdown_event)
bool SyncMessageFilter::Send(Message* message) {
{
base::AutoLock auto_lock(lock_);
- if (!io_loop_) {
+ if (!io_loop_.get()) {
delete message;
return false;
}
@@ -46,8 +46,8 @@ bool SyncMessageFilter::Send(Message* message) {
base::AutoLock auto_lock(lock_);
// Can't use this class on the main thread or else it can lead to deadlocks.
// Also by definition, can't use this on IO thread since we're blocking it.
- DCHECK(MessageLoopProxy::current() != listener_loop_);
- DCHECK(MessageLoopProxy::current() != io_loop_);
+ DCHECK(MessageLoopProxy::current() != listener_loop_.get());
+ DCHECK(MessageLoopProxy::current() != io_loop_.get());
pending_sync_messages_.insert(&pending_message);
}