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

Unified Diff: content/browser/accessibility/browser_accessibility_manager.cc

Issue 7648055: Add DCHECK to BrowserAccessibilityManager::Remove to detect undefined behavoir that may lead to a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address unit_tests errors on mac Created 9 years, 4 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/accessibility/browser_accessibility_manager_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/accessibility/browser_accessibility_manager.cc
===================================================================
--- content/browser/accessibility/browser_accessibility_manager.cc (revision 97086)
+++ content/browser/accessibility/browser_accessibility_manager.cc (working copy)
@@ -116,6 +116,9 @@
void BrowserAccessibilityManager::Remove(int32 child_id, int32 renderer_id) {
child_id_map_.erase(child_id);
+
+ // TODO(ctguil): Investigate if hit. We should never have a newer entry.
+ DCHECK(renderer_id_to_child_id_map_[renderer_id] == child_id);
// Make sure we don't overwrite a newer entry (see UpdateNode for a possible
// corner case).
if (renderer_id_to_child_id_map_[renderer_id] == child_id)
« no previous file with comments | « chrome/browser/accessibility/browser_accessibility_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698