| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 12 matching lines...) Expand all Loading... |
| 23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "core/css/CSSValuePool.h" | 26 #include "core/css/CSSValuePool.h" |
| 27 | 27 |
| 28 #include "platform/heap/Handle.h" | 28 #include "platform/heap/Handle.h" |
| 29 #include "wtf/Threading.h" | 29 #include "wtf/Threading.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 using namespace cssvalue; |
| 34 |
| 33 CSSValuePool& cssValuePool() { | 35 CSSValuePool& cssValuePool() { |
| 34 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 36 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| 35 ThreadSpecific<Persistent<CSSValuePool>>, threadSpecificPool, | 37 ThreadSpecific<Persistent<CSSValuePool>>, threadSpecificPool, |
| 36 new ThreadSpecific<Persistent<CSSValuePool>>()); | 38 new ThreadSpecific<Persistent<CSSValuePool>>()); |
| 37 Persistent<CSSValuePool>& poolHandle = *threadSpecificPool; | 39 Persistent<CSSValuePool>& poolHandle = *threadSpecificPool; |
| 38 if (!poolHandle) { | 40 if (!poolHandle) { |
| 39 poolHandle = new CSSValuePool; | 41 poolHandle = new CSSValuePool; |
| 40 poolHandle.registerAsStaticReference(); | 42 poolHandle.registerAsStaticReference(); |
| 41 } | 43 } |
| 42 return *poolHandle; | 44 return *poolHandle; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 65 visitor->trace(m_identifierValueCache); | 67 visitor->trace(m_identifierValueCache); |
| 66 visitor->trace(m_pixelValueCache); | 68 visitor->trace(m_pixelValueCache); |
| 67 visitor->trace(m_percentValueCache); | 69 visitor->trace(m_percentValueCache); |
| 68 visitor->trace(m_numberValueCache); | 70 visitor->trace(m_numberValueCache); |
| 69 visitor->trace(m_colorValueCache); | 71 visitor->trace(m_colorValueCache); |
| 70 visitor->trace(m_fontFaceValueCache); | 72 visitor->trace(m_fontFaceValueCache); |
| 71 visitor->trace(m_fontFamilyValueCache); | 73 visitor->trace(m_fontFamilyValueCache); |
| 72 } | 74 } |
| 73 | 75 |
| 74 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |