Index: mojo/embedder/embedder.cc |
diff --git a/mojo/embedder/embedder.cc b/mojo/embedder/embedder.cc |
index a9f70c5ef09cc70dd270baccccf1f407a9ccf5ee..cfeddba74b5a58c6f1303520787689a77c9b5adf 100644 |
--- a/mojo/embedder/embedder.cc |
+++ b/mojo/embedder/embedder.cc |
@@ -38,12 +38,14 @@ namespace { |
// Helper for |CreateChannel...()|. (Note: May return null for some failures.) |
scoped_refptr<system::Channel> MakeChannel( |
+ system::Core* core, |
ScopedPlatformHandle platform_handle, |
scoped_refptr<system::MessagePipe> message_pipe) { |
DCHECK(platform_handle.is_valid()); |
// Create and initialize a |system::Channel|. |
- scoped_refptr<system::Channel> channel = new system::Channel(); |
+ scoped_refptr<system::Channel> channel = |
+ new system::Channel(core->platform_support()); |
if (!channel->Init(system::RawChannel::Create(platform_handle.Pass()))) { |
// This is very unusual (e.g., maybe |platform_handle| was invalid or we |
// reached some system resource limit). |
@@ -76,12 +78,14 @@ scoped_refptr<system::Channel> MakeChannel( |
} |
void CreateChannelHelper( |
+ system::Core* core, |
ScopedPlatformHandle platform_handle, |
scoped_ptr<ChannelInfo> channel_info, |
scoped_refptr<system::MessagePipe> message_pipe, |
DidCreateChannelCallback callback, |
scoped_refptr<base::TaskRunner> callback_thread_task_runner) { |
- channel_info->channel = MakeChannel(platform_handle.Pass(), message_pipe); |
+ channel_info->channel = |
+ MakeChannel(core, platform_handle.Pass(), message_pipe); |
// Hand the channel back to the embedder. |
if (callback_thread_task_runner) { |
@@ -116,7 +120,7 @@ ScopedMessagePipeHandle CreateChannelOnIOThread( |
*channel_info = new ChannelInfo(); |
(*channel_info)->channel = |
- MakeChannel(platform_handle.Pass(), remote_message_pipe.second); |
+ MakeChannel(core, platform_handle.Pass(), remote_message_pipe.second); |
return rv.Pass(); |
} |
@@ -143,6 +147,7 @@ ScopedMessagePipeHandle CreateChannel( |
if (rv.is_valid()) { |
io_thread_task_runner->PostTask(FROM_HERE, |
base::Bind(&CreateChannelHelper, |
+ base::Unretained(core), |
base::Passed(&platform_handle), |
base::Passed(&channel_info), |
remote_message_pipe.second, |