Index: chrome/browser/extensions/api/messaging/message_service.cc |
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc |
index d52997437acc70f5e2c69d466309f7ee3d59bd95..74142f4f723084a88c2c9a6c845dc4638e7efcf4 100644 |
--- a/chrome/browser/extensions/api/messaging/message_service.cc |
+++ b/chrome/browser/extensions/api/messaging/message_service.cc |
@@ -403,9 +403,11 @@ void MessageService::OpenChannelToNativeApp( |
source_extension_id)); |
// Get handle of the native view and pass it to the native messaging host. |
+ content::RenderWidgetHost* render_widget_host = |
+ content::RenderWidgetHost::FromID(source_process_id, source_routing_id); |
gfx::NativeView native_view = |
- content::RenderWidgetHost::FromID(source_process_id, source_routing_id)-> |
- GetView()->GetNativeView(); |
+ render_widget_host ? render_widget_host->GetView()->GetNativeView() |
+ : NULL; |
not at google - send to devlin
2014/12/11 17:24:42
Are we supposed to use nullptr these days? I'm los
Sergey Ulanov
2014/12/11 19:25:29
Yes, it should be nullptr. This is my first change
not at google - send to devlin
2014/12/11 20:19:46
Where is native_view used then?
|
std::string error = kReceivingEndDoesntExistError; |
scoped_ptr<NativeMessageHost> native_host = NativeMessageHost::Create( |