| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index 0847fa981ac7c95e682792f231eb2f3f65d83d11..bd5d8c9e7850e8fc8b55221d1f89378e6605a19a 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -4909,14 +4909,8 @@ WebMediaPlayer* RenderViewImpl::CreateAndroidWebMediaPlayer(
|
|
|
| #if defined(OS_MACOSX)
|
| void RenderViewImpl::OnSelectPopupMenuItem(int selected_index) {
|
| - if (external_popup_menu_ == NULL) {
|
| - // Crash reports from the field indicate that we can be notified with a
|
| - // NULL external popup menu (we probably get notified twice).
|
| - // If you hit this please file a bug against jcivelli and include the page
|
| - // and steps to repro.
|
| - NOTREACHED();
|
| + if (external_popup_menu_ == NULL)
|
| return;
|
| - }
|
| external_popup_menu_->DidSelectItem(selected_index);
|
| external_popup_menu_.reset();
|
| }
|
| @@ -4938,6 +4932,12 @@ void RenderViewImpl::OnSelectPopupMenuItems(
|
| }
|
| #endif
|
|
|
| +void RenderViewImpl::DidHideExternalPopupMenu() {
|
| + // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close
|
| + // is called. Otherwise, createExternalPopupMenu() for new popup will fail.
|
| + external_popup_menu_.reset();
|
| +}
|
| +
|
| void RenderViewImpl::OnShowContextMenu(const gfx::Point& location) {
|
| context_menu_source_type_ = ui::MENU_SOURCE_TOUCH_EDIT_MENU;
|
| touch_editing_context_menu_location_ = location;
|
|
|