Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValuePool.cpp

Issue 1850413002: Improve DEFINE_STATIC_LOCAL()'s handling of Blink GCed objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address compilation failure Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 16 matching lines...) Expand all
27 27
28 #include "core/css/CSSValueList.h" 28 #include "core/css/CSSValueList.h"
29 #include "core/css/parser/CSSParser.h" 29 #include "core/css/parser/CSSParser.h"
30 #include "core/style/ComputedStyle.h" 30 #include "core/style/ComputedStyle.h"
31 #include "wtf/Threading.h" 31 #include "wtf/Threading.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 CSSValuePool& cssValuePool() 35 CSSValuePool& cssValuePool()
36 { 36 {
37 DEFINE_STATIC_LOCAL(Persistent<CSSValuePool>, pool, (new CSSValuePool())); 37 DEFINE_STATIC_LOCAL(CSSValuePool, pool, (new CSSValuePool));
38 return *pool; 38 return pool;
39 } 39 }
40 40
41 CSSValuePool::CSSValuePool() 41 CSSValuePool::CSSValuePool()
42 : m_inheritedValue(CSSInheritedValue::create()) 42 : m_inheritedValue(CSSInheritedValue::create())
43 , m_implicitInitialValue(CSSInitialValue::createImplicit()) 43 , m_implicitInitialValue(CSSInitialValue::createImplicit())
44 , m_explicitInitialValue(CSSInitialValue::createExplicit()) 44 , m_explicitInitialValue(CSSInitialValue::createExplicit())
45 , m_unsetValue(CSSUnsetValue::create()) 45 , m_unsetValue(CSSUnsetValue::create())
46 , m_colorTransparent(CSSColorValue::create(Color::transparent)) 46 , m_colorTransparent(CSSColorValue::create(Color::transparent))
47 , m_colorWhite(CSSColorValue::create(Color::white)) 47 , m_colorWhite(CSSColorValue::create(Color::white))
48 , m_colorBlack(CSSColorValue::create(Color::black)) 48 , m_colorBlack(CSSColorValue::create(Color::black))
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 visitor->trace(m_colorBlack); 176 visitor->trace(m_colorBlack);
177 visitor->trace(m_pixelValueCache); 177 visitor->trace(m_pixelValueCache);
178 visitor->trace(m_percentValueCache); 178 visitor->trace(m_percentValueCache);
179 visitor->trace(m_numberValueCache); 179 visitor->trace(m_numberValueCache);
180 visitor->trace(m_fontFaceValueCache); 180 visitor->trace(m_fontFaceValueCache);
181 visitor->trace(m_fontFamilyValueCache); 181 visitor->trace(m_fontFamilyValueCache);
182 #endif 182 #endif
183 } 183 }
184 184
185 } // namespace blink 185 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPathValue.cpp ('k') | third_party/WebKit/Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698