Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 23478020: Makes sure that an input method doesn't reference to a destroyed object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Worked on nits. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 261278f41e864312101a6f23f7748481b62ed215..8e4de004c9afae707a269e09133304e642f1831d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2464,6 +2464,13 @@ void RenderWidgetHostViewAura::OnWindowDestroying() {
LPARAM lparam = reinterpret_cast<LPARAM>(this);
EnumChildWindows(parent, WindowDestroyingCallback, lparam);
#endif
+
+ // Make sure that the input method no longer references to this object before
+ // this object is removed from the root window (i.e. this object loses access
+ // to the input method).
+ ui::InputMethod* input_method = GetInputMethod();
+ if (input_method)
+ input_method->DetachTextInputClient(this);
}
void RenderWidgetHostViewAura::OnWindowDestroyed() {
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698