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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp

Issue 2828013002: Replace DCHECK with DCHECK_EQ and DCHECK_GT as appropriate in modules/accessibility (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014, Google Inc. All rights reserved. 2 * Copyright (C) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 if (!obj) 466 if (!obj)
467 return; 467 return;
468 468
469 obj->Detach(); 469 obj->Detach();
470 RemoveAXID(obj); 470 RemoveAXID(obj);
471 471
472 // finally remove the object 472 // finally remove the object
473 if (!objects_.Take(ax_id)) 473 if (!objects_.Take(ax_id))
474 return; 474 return;
475 475
476 DCHECK(objects_.size() >= ids_in_use_.size()); 476 DCHECK_GE(objects_.size(), ids_in_use_.size());
477 } 477 }
478 478
479 void AXObjectCacheImpl::Remove(LayoutObject* layout_object) { 479 void AXObjectCacheImpl::Remove(LayoutObject* layout_object) {
480 if (!layout_object) 480 if (!layout_object)
481 return; 481 return;
482 482
483 AXID ax_id = layout_object_mapping_.at(layout_object); 483 AXID ax_id = layout_object_mapping_.at(layout_object);
484 Remove(ax_id); 484 Remove(ax_id);
485 layout_object_mapping_.erase(layout_object); 485 layout_object_mapping_.erase(layout_object);
486 } 486 }
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 visitor->Trace(document_); 1249 visitor->Trace(document_);
1250 visitor->Trace(node_object_mapping_); 1250 visitor->Trace(node_object_mapping_);
1251 1251
1252 visitor->Trace(objects_); 1252 visitor->Trace(objects_);
1253 visitor->Trace(notifications_to_post_); 1253 visitor->Trace(notifications_to_post_);
1254 1254
1255 AXObjectCache::Trace(visitor); 1255 AXObjectCache::Trace(visitor);
1256 } 1256 }
1257 1257
1258 } // namespace blink 1258 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698