X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Frenderer%2Fnpapi%2Fwebplugin_delegate_proxy.cc;h=13eb8a7e5a8c64576cb39d628d220326871daf24;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=1943e8022595b6bc7fd59d7796555472d7be631f;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/renderer/npapi/webplugin_delegate_proxy.cc b/src/content/renderer/npapi/webplugin_delegate_proxy.cc index 1943e80..13eb8a7 100644 --- a/src/content/renderer/npapi/webplugin_delegate_proxy.cc +++ b/src/content/renderer/npapi/webplugin_delegate_proxy.cc @@ -486,7 +486,7 @@ void WebPluginDelegateProxy::OnChannelError() { } plugin_->Invalidate(); } - if (!channel_host_->expecting_shutdown()) { + if (channel_host_.get() && !channel_host_->expecting_shutdown()) { render_view_->main_render_frame()->PluginCrashed( info_.path, channel_host_->peer_pid()); } @@ -525,6 +525,9 @@ static void CopyTransportDIBHandleForMessage( void WebPluginDelegateProxy::SendUpdateGeometry( bool bitmaps_changed) { + if (!channel_host_.get()) + return; + PluginMsg_UpdateGeometry_Param param; param.window_rect = plugin_rect_; param.clip_rect = clip_rect_; @@ -730,6 +733,9 @@ NPObject* WebPluginDelegateProxy::GetPluginScriptableObject() { if (npobject_) return WebBindings::retainObject(npobject_); + if (!channel_host_.get()) + return NULL; + int route_id = MSG_ROUTING_NONE; Send(new PluginMsg_GetPluginScriptableObject(instance_id_, &route_id)); if (route_id == MSG_ROUTING_NONE) @@ -769,7 +775,7 @@ void WebPluginDelegateProxy::SetFocus(bool focused) { bool WebPluginDelegateProxy::HandleInputEvent( const WebInputEvent& event, WebCursor::CursorInfo* cursor_info) { - bool handled; + bool handled = false; WebCursor cursor; // A windowless plugin can enter a modal loop in the context of a // NPP_HandleEvent call, in which case we need to pump messages to