| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 XMLMIMETypeRegExp& xmlTypeRegExp() { return *m_xmlTypeRegExp; } | 63 XMLMIMETypeRegExp& xmlTypeRegExp() { return *m_xmlTypeRegExp; } |
| 64 | 64 |
| 65 #if USE(ICU_UNICODE) | 65 #if USE(ICU_UNICODE) |
| 66 ICUConverterWrapper& cachedConverterICU() { return *m_cachedConverterICU
; } | 66 ICUConverterWrapper& cachedConverterICU() { return *m_cachedConverterICU
; } |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 #if PLATFORM(MAC) | 69 #if PLATFORM(MAC) |
| 70 TECConverterWrapper& cachedConverterTEC() { return *m_cachedConverterTEC
; } | 70 TECConverterWrapper& cachedConverterTEC() { return *m_cachedConverterTEC
; } |
| 71 #endif | 71 #endif |
| 72 | 72 |
| 73 #if ENABLE(INSPECTOR) | |
| 74 ThreadLocalInspectorCounters& inspectorCounters() { return *m_inspectorC
ounters; } | 73 ThreadLocalInspectorCounters& inspectorCounters() { return *m_inspectorC
ounters; } |
| 75 #endif | |
| 76 | 74 |
| 77 private: | 75 private: |
| 78 OwnPtr<CachedResourceRequestInitiators> m_cachedResourceRequestInitiator
s; | 76 OwnPtr<CachedResourceRequestInitiators> m_cachedResourceRequestInitiator
s; |
| 79 OwnPtr<EventNames> m_eventNames; | 77 OwnPtr<EventNames> m_eventNames; |
| 80 OwnPtr<ThreadTimers> m_threadTimers; | 78 OwnPtr<ThreadTimers> m_threadTimers; |
| 81 OwnPtr<XMLMIMETypeRegExp> m_xmlTypeRegExp; | 79 OwnPtr<XMLMIMETypeRegExp> m_xmlTypeRegExp; |
| 82 | 80 |
| 83 #ifndef NDEBUG | 81 #ifndef NDEBUG |
| 84 bool m_isMainThread; | 82 bool m_isMainThread; |
| 85 #endif | 83 #endif |
| 86 | 84 |
| 87 #if USE(ICU_UNICODE) | 85 #if USE(ICU_UNICODE) |
| 88 OwnPtr<ICUConverterWrapper> m_cachedConverterICU; | 86 OwnPtr<ICUConverterWrapper> m_cachedConverterICU; |
| 89 #endif | 87 #endif |
| 90 | 88 |
| 91 #if PLATFORM(MAC) | 89 #if PLATFORM(MAC) |
| 92 OwnPtr<TECConverterWrapper> m_cachedConverterTEC; | 90 OwnPtr<TECConverterWrapper> m_cachedConverterTEC; |
| 93 #endif | 91 #endif |
| 94 | 92 |
| 95 #if ENABLE(INSPECTOR) | |
| 96 OwnPtr<ThreadLocalInspectorCounters> m_inspectorCounters; | 93 OwnPtr<ThreadLocalInspectorCounters> m_inspectorCounters; |
| 97 #endif | |
| 98 | 94 |
| 99 #if ENABLE(WORKERS) | 95 #if ENABLE(WORKERS) |
| 100 static ThreadSpecific<ThreadGlobalData>* staticData; | 96 static ThreadSpecific<ThreadGlobalData>* staticData; |
| 101 #else | 97 #else |
| 102 static ThreadGlobalData* staticData; | 98 static ThreadGlobalData* staticData; |
| 103 #endif | 99 #endif |
| 104 friend ThreadGlobalData& threadGlobalData(); | 100 friend ThreadGlobalData& threadGlobalData(); |
| 105 }; | 101 }; |
| 106 | 102 |
| 107 inline ThreadGlobalData& threadGlobalData() | 103 inline ThreadGlobalData& threadGlobalData() |
| (...skipping 12 matching lines...) Expand all Loading... |
| 120 // ThreadGlobalData constructor indirectly uses staticData, so we need t
o set up the memory before invoking it. | 116 // ThreadGlobalData constructor indirectly uses staticData, so we need t
o set up the memory before invoking it. |
| 121 new (ThreadGlobalData::staticData) ThreadGlobalData; | 117 new (ThreadGlobalData::staticData) ThreadGlobalData; |
| 122 } | 118 } |
| 123 return *ThreadGlobalData::staticData; | 119 return *ThreadGlobalData::staticData; |
| 124 #endif | 120 #endif |
| 125 } | 121 } |
| 126 | 122 |
| 127 } // namespace WebCore | 123 } // namespace WebCore |
| 128 | 124 |
| 129 #endif // ThreadGlobalData_h | 125 #endif // ThreadGlobalData_h |
| OLD | NEW |