| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 DEFINE_STATIC_LOCAL(Mutex, mutex, ()); | 111 DEFINE_STATIC_LOCAL(Mutex, mutex, ()); |
| 112 return mutex; | 112 return mutex; |
| 113 } | 113 } |
| 114 | 114 |
| 115 static TextEncodingNameMap* textEncodingNameMap; | 115 static TextEncodingNameMap* textEncodingNameMap; |
| 116 static TextCodecMap* textCodecMap; | 116 static TextCodecMap* textCodecMap; |
| 117 static bool didExtendTextCodecMaps; | 117 static bool didExtendTextCodecMaps; |
| 118 static HashSet<const char*>* japaneseEncodings; | 118 static HashSet<const char*>* japaneseEncodings; |
| 119 static HashSet<const char*>* nonBackslashEncodings; | 119 static HashSet<const char*>* nonBackslashEncodings; |
| 120 | 120 |
| 121 static const char* const textEncodingNameBlacklist[] = { "UTF-7" }; | 121 static const char textEncodingNameBlacklist[][6] = { "UTF-7" }; |
| 122 | 122 |
| 123 #if ERROR_DISABLED | 123 #if ERROR_DISABLED |
| 124 | 124 |
| 125 static inline void checkExistingName(const char*, const char*) { } | 125 static inline void checkExistingName(const char*, const char*) { } |
| 126 | 126 |
| 127 #else | 127 #else |
| 128 | 128 |
| 129 static void checkExistingName(const char* alias, const char* atomicName) | 129 static void checkExistingName(const char* alias, const char* atomicName) |
| 130 { | 130 { |
| 131 const char* oldAtomicName = textEncodingNameMap->get(alias); | 131 const char* oldAtomicName = textEncodingNameMap->get(alias); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 MutexLocker lock(encodingRegistryMutex()); | 353 MutexLocker lock(encodingRegistryMutex()); |
| 354 | 354 |
| 355 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); | 355 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); |
| 356 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); | 356 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); |
| 357 for (; it != end; ++it) | 357 for (; it != end; ++it) |
| 358 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value); | 358 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value); |
| 359 } | 359 } |
| 360 #endif | 360 #endif |
| 361 | 361 |
| 362 } // namespace WTF | 362 } // namespace WTF |
| OLD | NEW |