Index: content/browser/renderer_host/render_widget_host_view_android.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc |
index 613fca905efe1e60000847735d57812d776bd0a6..331cf08f5717df35bdaa70c98379109c7b574435 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
@@ -718,8 +718,14 @@ void RenderWidgetHostViewAndroid::SelectionChanged(const base::string16& text, |
if (selection_controller_) |
selection_controller_->OnSelectionEmpty(text.empty()); |
- if (text.empty() || range.is_empty() || !content_view_core_) |
+ if (!content_view_core_) |
+ return; |
+ if (range.is_empty()) { |
+ content_view_core_->OnSelectionChanged(""); |
return; |
+ } |
+ |
+ DCHECK(!text.empty()); |
size_t pos = range.GetMin() - offset; |
size_t n = range.length(); |