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

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/ui/autofill/autofill_popup_controller_unittest.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 ff96af2e105b448b97ee239b9b3c170011966807..015637a8b22373e86b5c8a78c43029d5b8d81dc4 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1245,6 +1245,9 @@ void RenderWidgetHostImpl::AddKeyboardListener(KeyboardListener* listener) {
void RenderWidgetHostImpl::RemoveKeyboardListener(
KeyboardListener* listener) {
+ // Ensure that the element is actually in the list.
+ DCHECK(std::find(keyboard_listeners_.begin(), keyboard_listeners_.end(),
+ listener) != keyboard_listeners_.end());
keyboard_listeners_.remove(listener);
}
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698