| Index: chrome/browser/extensions/extension_message_service.cc
|
| diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
|
| index 756ec4e0f737e1d8bb576a8646e614ffbfac162a..73f441b62d7683b0623686f87ec50cc9888704b2 100644
|
| --- a/chrome/browser/extensions/extension_message_service.cc
|
| +++ b/chrome/browser/extensions/extension_message_service.cc
|
| @@ -147,8 +147,9 @@ void ExtensionMessageService::OpenChannelToExtension(
|
| // Note: we use the source's profile here. If the source is an incognito
|
| // process, we will use the incognito EPM to find the right extension process,
|
| // which depends on whether the extension uses spanning or split mode.
|
| + Profile* profile = static_cast<Profile*>(source->context());
|
| MessagePort receiver(
|
| - source->profile()->GetExtensionProcessManager()->GetExtensionProcess(
|
| + profile->GetExtensionProcessManager()->GetExtensionProcess(
|
| target_extension_id),
|
| MSG_ROUTING_CONTROL);
|
| TabContents* source_contents = tab_util::GetTabContentsByID(
|
| @@ -173,10 +174,11 @@ void ExtensionMessageService::OpenChannelToTab(
|
| RenderProcessHost* source = RenderProcessHost::FromID(source_process_id);
|
| if (!source)
|
| return;
|
| + Profile* profile = static_cast<Profile*>(source->context());
|
|
|
| TabContentsWrapper* contents = NULL;
|
| MessagePort receiver;
|
| - if (ExtensionTabUtil::GetTabById(tab_id, source->profile(), true,
|
| + if (ExtensionTabUtil::GetTabById(tab_id, profile, true,
|
| NULL, NULL, &contents, NULL)) {
|
| receiver.sender = contents->render_view_host();
|
| receiver.routing_id = contents->render_view_host()->routing_id();
|
|
|