OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 Vector<const char*> names; | 189 Vector<const char*> names; |
190 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); | 190 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); |
191 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); | 191 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); |
192 for (; it != end; ++it) { | 192 for (; it != end; ++it) { |
193 if (it->value == atomicName) | 193 if (it->value == atomicName) |
194 names.push_back(it->key); | 194 names.push_back(it->key); |
195 } | 195 } |
196 | 196 |
197 textEncodingNameMap->removeAll(names); | 197 textEncodingNameMap->removeAll(names); |
198 | 198 |
199 textCodecMap->remove(atomicName); | 199 textCodecMap->erase(atomicName); |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 static void buildBaseTextCodecMaps() { | 203 static void buildBaseTextCodecMaps() { |
204 DCHECK(isMainThread()); | 204 DCHECK(isMainThread()); |
205 DCHECK(!textCodecMap); | 205 DCHECK(!textCodecMap); |
206 DCHECK(!textEncodingNameMap); | 206 DCHECK(!textEncodingNameMap); |
207 | 207 |
208 textCodecMap = new TextCodecMap; | 208 textCodecMap = new TextCodecMap; |
209 textEncodingNameMap = new TextEncodingNameMap; | 209 textEncodingNameMap = new TextEncodingNameMap; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 MutexLocker lock(encodingRegistryMutex()); | 307 MutexLocker lock(encodingRegistryMutex()); |
308 | 308 |
309 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); | 309 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); |
310 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); | 310 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); |
311 for (; it != end; ++it) | 311 for (; it != end; ++it) |
312 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value); | 312 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value); |
313 } | 313 } |
314 #endif | 314 #endif |
315 | 315 |
316 } // namespace WTF | 316 } // namespace WTF |
OLD | NEW |