OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 21 matching lines...) Expand all Loading... |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class CORE_EXPORT CSSValue : public RefCountedWillBeGarbageCollectedFinalized<CS
SValue> { | 34 class CORE_EXPORT CSSValue : public RefCountedWillBeGarbageCollectedFinalized<CS
SValue> { |
35 public: | 35 public: |
36 #if ENABLE(OILPAN) | 36 #if ENABLE(OILPAN) |
37 // Override operator new to allocate CSSValue subtype objects onto | 37 // Override operator new to allocate CSSValue subtype objects onto |
38 // a dedicated heap. | 38 // a dedicated heap. |
39 GC_PLUGIN_IGNORE("crbug.com/443854") | 39 GC_PLUGIN_IGNORE("crbug.com/443854") |
40 void* operator new(size_t size) | 40 void* operator new(size_t size) |
41 { | 41 { |
42 return allocateObject(size); | 42 return allocateObject(size, false); |
43 } | 43 } |
44 static void* allocateObject(size_t size) | 44 static void* allocateObject(size_t size, bool isEager) |
45 { | 45 { |
46 ThreadState* state = ThreadStateFor<ThreadingTrait<CSSValue>::Affinity>:
:state(); | 46 ThreadState* state = ThreadStateFor<ThreadingTrait<CSSValue>::Affinity>:
:state(); |
47 return Heap::allocateOnHeapIndex(state, size, CSSValueHeapIndex, GCInfoT
rait<CSSValue>::index()); | 47 return Heap::allocateOnHeapIndex(state, size, isEager ? EagerSweepHeapIn
dex : CSSValueHeapIndex, GCInfoTrait<CSSValue>::index()); |
48 } | 48 } |
49 #else | 49 #else |
50 // Override RefCounted's deref() to ensure operator delete is called on | 50 // Override RefCounted's deref() to ensure operator delete is called on |
51 // the appropriate subclass type. | 51 // the appropriate subclass type. |
52 void deref() | 52 void deref() |
53 { | 53 { |
54 if (derefBase()) | 54 if (derefBase()) |
55 destroy(); | 55 destroy(); |
56 } | 56 } |
57 #endif // !ENABLE(OILPAN) | 57 #endif // !ENABLE(OILPAN) |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 { | 231 { |
232 return first ? second && first->equals(*second) : !second; | 232 return first ? second && first->equals(*second) : !second; |
233 } | 233 } |
234 | 234 |
235 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ | 235 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ |
236 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica
te) | 236 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica
te) |
237 | 237 |
238 } // namespace blink | 238 } // namespace blink |
239 | 239 |
240 #endif // CSSValue_h | 240 #endif // CSSValue_h |
OLD | NEW |