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

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

Issue 12223106: Properly Remove Autofill Keyboard Listener. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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 | « chrome/browser/autofill/autofill_external_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index d6a5f498a82ac54bfc9bc3ce1de394d3bd40fe04..0a837864cf59243836aad28560d9e6d53bff1c49 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1214,6 +1214,9 @@ void RenderWidgetHostImpl::AddKeyboardListener(KeyboardListener* listener) {
void RenderWidgetHostImpl::RemoveKeyboardListener(
KeyboardListener* listener) {
+ // Ensure that the element in actually in the list.
Ilya Sherman 2013/02/12 20:57:57 nit: first "in" -> "is"
csharp 2013/02/12 21:02:37 Done.
+ DCHECK(std::find(keyboard_listeners_.begin(), keyboard_listeners_.end(),
+ listener) != keyboard_listeners_.end());
Ilya Sherman 2013/02/12 20:57:57 I don't follow how this helps us spot this class o
csharp 2013/02/12 21:02:37 Yup, this bug here is that the Autofill controller
Ilya Sherman 2013/02/12 21:07:43 Ah, I thought we were passing in a pointer to memo
keyboard_listeners_.remove(listener);
}
« no previous file with comments | « chrome/browser/autofill/autofill_external_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698