Skip to content

Commit

Permalink
Revert of Change the callsites of InterfacePtr<> methods which direct…
Browse files Browse the repository at this point in the history
…ly deal with message pipe handles. (patchset #3 id:40001 of https://codereview.chromium.org/1120753004/)

Reason for revert:
This might've broke Mac 10.9's IPC message handling(?):
https://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests%20%28dbg%29/builds/5606

Lots of errors like this:
[361:34051:0504/184612:WARNING:ipc_mojo_bootstrap.cc(214)] Detected error on Mojo bootstrap channel.
[361:34051:0504/184612:WARNING:ipc_message_attachment_set.cc(37)] MessageAttachmentSet destroyed with unconsumed descriptors: 0/1

Original issue's description:
> Change the callsites of InterfacePtr<> methods which directly deal with message pipe handles.
>
> Because those methods are going to be removed.
>
> BUG=None
>
> Committed: https://crrev.com/99f65895acf2086af0755b9ea865d6ded4baecd6
> Cr-Commit-Position: refs/heads/master@{#328232}

TBR=jam@chromium.org,rockot@chromium.org,yzshen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=None

Review URL: https://codereview.chromium.org/1124553004

Cr-Commit-Position: refs/heads/master@{#328264}
  • Loading branch information
danbeam authored and Commit bot committed May 5, 2015
1 parent 86b2cb8 commit eec7904
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions content/child/mojo/mojo_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ void MojoApplication::OnActivate(
DCHECK(message_pipe.is_valid());

ApplicationSetupPtr application_setup;
application_setup.Bind(
mojo::InterfacePtrInfo<ApplicationSetup>(message_pipe.Pass(), 0u));
application_setup.Bind(message_pipe.Pass());

mojo::ServiceProviderPtr services;
mojo::ServiceProviderPtr exposed_services;
Expand Down
5 changes: 3 additions & 2 deletions content/public/common/service_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ class CONTENT_EXPORT ServiceRegistry {
// Connect to an interface provided by the remote service provider.
template <typename Interface>
void ConnectToRemoteService(mojo::InterfacePtr<Interface>* ptr) {
ConnectToRemoteService(Interface::Name_,
mojo::GetProxy(ptr).PassMessagePipe());
mojo::MessagePipe pipe;
ptr->Bind(pipe.handle0.Pass());
ConnectToRemoteService(Interface::Name_, pipe.handle1.Pass());
}
virtual void ConnectToRemoteService(const base::StringPiece& name,
mojo::ScopedMessagePipeHandle handle) = 0;
Expand Down
2 changes: 1 addition & 1 deletion extensions/renderer/api/serial/data_receiver_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class DataReceiverFactory : public gin::Wrappable<DataReceiverFactory> {
callback_.Run(mojo::GetProxy(&sink), client.Pass());

gin::Dictionary result = gin::Dictionary::CreateEmpty(isolate_);
result.Set("source", sink.PassInterface().PassHandle().release());
result.Set("source", sink.PassMessagePipe().release());
result.Set("client", client_request.PassMessagePipe().release());
return result;
}
Expand Down
4 changes: 1 addition & 3 deletions ipc/mojo/ipc_channel_mojo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ void ServerChannelMojo::OnPipeAvailable(
return;
}

client_channel_.Bind(
mojo::InterfacePtrInfo<ClientChannel>(
CreateMessagingPipe(handle.Pass()), 0u));
client_channel_.Bind(CreateMessagingPipe(handle.Pass()));
client_channel_.set_error_handler(this);
client_channel_->Init(
peer.Pass(),
Expand Down

0 comments on commit eec7904

Please sign in to comment.