| 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 20 matching lines...) Expand all Loading... |
| 31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 32 #include "wtf/Threading.h" | 32 #include "wtf/Threading.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 CSSValuePool& cssValuePool() | 36 CSSValuePool& cssValuePool() |
| 37 { | 37 { |
| 38 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<Persistent<CSSValuePool>>, th
readSpecificPool, new ThreadSpecific<Persistent<CSSValuePool>>()); | 38 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<Persistent<CSSValuePool>>, th
readSpecificPool, new ThreadSpecific<Persistent<CSSValuePool>>()); |
| 39 Persistent<CSSValuePool>& poolHandle = *threadSpecificPool; | 39 Persistent<CSSValuePool>& poolHandle = *threadSpecificPool; |
| 40 if (!poolHandle) { | 40 if (!poolHandle) { |
| 41 poolHandle = new CSSValuePool(); | 41 poolHandle = new CSSValuePool; |
| 42 poolHandle.clearOnThreadShutdown(); | 42 poolHandle.registerAsStaticReference(); |
| 43 } | 43 } |
| 44 return *poolHandle; | 44 return *poolHandle; |
| 45 } | 45 } |
| 46 | 46 |
| 47 CSSValuePool::CSSValuePool() | 47 CSSValuePool::CSSValuePool() |
| 48 : m_inheritedValue(CSSInheritedValue::create()) | 48 : m_inheritedValue(CSSInheritedValue::create()) |
| 49 , m_implicitInitialValue(CSSInitialValue::createImplicit()) | 49 , m_implicitInitialValue(CSSInitialValue::createImplicit()) |
| 50 , m_explicitInitialValue(CSSInitialValue::createExplicit()) | 50 , m_explicitInitialValue(CSSInitialValue::createExplicit()) |
| 51 , m_unsetValue(CSSUnsetValue::create()) | 51 , m_unsetValue(CSSUnsetValue::create()) |
| 52 , m_colorTransparent(CSSColorValue::create(Color::transparent)) | 52 , m_colorTransparent(CSSColorValue::create(Color::transparent)) |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 visitor->trace(m_colorWhite); | 172 visitor->trace(m_colorWhite); |
| 173 visitor->trace(m_colorBlack); | 173 visitor->trace(m_colorBlack); |
| 174 visitor->trace(m_pixelValueCache); | 174 visitor->trace(m_pixelValueCache); |
| 175 visitor->trace(m_percentValueCache); | 175 visitor->trace(m_percentValueCache); |
| 176 visitor->trace(m_numberValueCache); | 176 visitor->trace(m_numberValueCache); |
| 177 visitor->trace(m_fontFaceValueCache); | 177 visitor->trace(m_fontFaceValueCache); |
| 178 visitor->trace(m_fontFamilyValueCache); | 178 visitor->trace(m_fontFamilyValueCache); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |