OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed. |
3 * Copyright (C) 2008 David Levin <levin@chromium.org> | 3 * Copyright (C) 2008 David Levin <levin@chromium.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 template <typename HashTableType, typename ValueType> struct HashTableAddResult final { | 280 template <typename HashTableType, typename ValueType> struct HashTableAddResult final { |
281 STACK_ALLOCATED(); | 281 STACK_ALLOCATED(); |
282 HashTableAddResult(const HashTableType* container, ValueType* storedValue, b ool isNewEntry) | 282 HashTableAddResult(const HashTableType* container, ValueType* storedValue, b ool isNewEntry) |
283 : storedValue(storedValue) | 283 : storedValue(storedValue) |
284 , isNewEntry(isNewEntry) | 284 , isNewEntry(isNewEntry) |
285 #if ENABLE(SECURITY_ASSERT) | 285 #if ENABLE(SECURITY_ASSERT) |
286 , m_container(container) | 286 , m_container(container) |
287 , m_containerModifications(container->modifications()) | 287 , m_containerModifications(container->modifications()) |
288 #endif | 288 #endif |
289 { | 289 { |
290 ASSERT_UNUSED(container, container); | 290 ALLOW_UNUSED_LOCAL(container); |
Nico
2016/03/18 14:34:25
Is this needed? container is used (assigned to m_c
Nico
2016/03/22 02:56:21
(Did you see this?)
tkent
2016/03/22 03:04:21
It's used only if ENABLE(SECURITY_ASSERT).
I remem
| |
291 DCHECK(container); | |
291 } | 292 } |
292 | 293 |
293 ValueType* storedValue; | 294 ValueType* storedValue; |
294 bool isNewEntry; | 295 bool isNewEntry; |
295 | 296 |
296 #if ENABLE(SECURITY_ASSERT) | 297 #if ENABLE(SECURITY_ASSERT) |
297 ~HashTableAddResult() | 298 ~HashTableAddResult() |
298 { | 299 { |
299 // If rehash happened before accessing storedValue, it's | 300 // If rehash happened before accessing storedValue, it's |
300 // use-after-free. Any modification may cause a rehash, so we check for | 301 // use-after-free. Any modification may cause a rehash, so we check for |
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1523 CollectionIterator end(toBeRemoved.end()); | 1524 CollectionIterator end(toBeRemoved.end()); |
1524 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) | 1525 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) |
1525 collection.remove(*it); | 1526 collection.remove(*it); |
1526 } | 1527 } |
1527 | 1528 |
1528 } // namespace WTF | 1529 } // namespace WTF |
1529 | 1530 |
1530 #include "wtf/HashIterators.h" | 1531 #include "wtf/HashIterators.h" |
1531 | 1532 |
1532 #endif // WTF_HashTable_h | 1533 #endif // WTF_HashTable_h |
OLD | NEW |