| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |