Chromium Code Reviews| 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 ddb0f0ce1fb840d1ed944fc0e7a18a68f6385e85..80b42fc7cf29685e9bd21fa8c024f19df4f22475 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
| @@ -1759,12 +1759,10 @@ void RenderWidgetHostViewAndroid::SetContentViewCore( |
| selection_controller_.reset(); |
| ReleaseLocksOnSurface(); |
| resize = true; |
| - if (content_view_core_) { |
| - if (!content_view_core) |
| - content_view_core_->RemoveObserver(this); |
| - else |
| - content_view_core->AddObserver(this); |
| - } |
| + if (content_view_core_ && !content_view_core) |
| + content_view_core_->RemoveObserver(this); |
|
no sievers
2016/02/25 19:23:16
So that fixes the else-path where we might not hav
Yusuf
2016/02/25 19:37:03
Another good point. Right now, we never call a sin
|
| + else |
| + content_view_core->AddObserver(this); |
| } |
| content_view_core_ = content_view_core; |