| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/wtf/text/AtomicStringTable.h" | 5 #include "platform/wtf/text/AtomicStringTable.h" |
| 6 | 6 |
| 7 #include "platform/wtf/text/StringHash.h" | 7 #include "platform/wtf/text/StringHash.h" |
| 8 #include "platform/wtf/text/UTF8.h" | 8 #include "platform/wtf/text/UTF8.h" |
| 9 | 9 |
| 10 namespace WTF { | 10 namespace WTF { |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 if (!buffer.hash) | 207 if (!buffer.hash) |
| 208 return nullptr; | 208 return nullptr; |
| 209 | 209 |
| 210 return AddToStringTable<HashAndUTF8Characters, | 210 return AddToStringTable<HashAndUTF8Characters, |
| 211 HashAndUTF8CharactersTranslator>(buffer); | 211 HashAndUTF8CharactersTranslator>(buffer); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void AtomicStringTable::Remove(StringImpl* string) { | 214 void AtomicStringTable::Remove(StringImpl* string) { |
| 215 DCHECK(string->IsAtomic()); | 215 DCHECK(string->IsAtomic()); |
| 216 auto iterator = table_.Find(string); | 216 auto iterator = table_.Find(string); |
| 217 RELEASE_ASSERT(iterator != table_.end()); | 217 CHECK_NE(iterator, table_.end()); |
| 218 table_.erase(iterator); | 218 table_.erase(iterator); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace WTF | 221 } // namespace WTF |
| OLD | NEW |