| 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 23 matching lines...) Expand all Loading... |
| 34 // Override operator new to allocate CSSValueObject subtype objects onto | 34 // Override operator new to allocate CSSValueObject subtype objects onto |
| 35 // a dedicated heap. | 35 // a dedicated heap. |
| 36 GC_PLUGIN_IGNORE("crbug.com/443854") | 36 GC_PLUGIN_IGNORE("crbug.com/443854") |
| 37 void* operator new(size_t size) | 37 void* operator new(size_t size) |
| 38 { | 38 { |
| 39 return allocateObject(size, false); | 39 return allocateObject(size, false); |
| 40 } | 40 } |
| 41 static void* allocateObject(size_t size, bool isEager) | 41 static void* allocateObject(size_t size, bool isEager) |
| 42 { | 42 { |
| 43 ThreadState* state = ThreadStateFor<ThreadingTrait<CSSValueObject>::Affi
nity>::state(); | 43 ThreadState* state = ThreadStateFor<ThreadingTrait<CSSValueObject>::Affi
nity>::state(); |
| 44 return Heap::allocateOnHeapIndex(state, size, isEager ? ThreadState::Eag
erSweepHeapIndex : ThreadState::CSSValueHeapIndex, GCInfoTrait<CSSValueObject>::
index()); | 44 return Heap::allocateOnHeapIndex(state, size, isEager ? ThreadState::Eag
erSweepHeapIndex : ThreadState::CSSValueObjectHeapIndex, GCInfoTrait<CSSValueObj
ect>::index()); |
| 45 } | 45 } |
| 46 #else | 46 #else |
| 47 // Override RefCounted's deref() to ensure operator delete is called on | 47 // Override RefCounted's deref() to ensure operator delete is called on |
| 48 // the appropriate subclass type. | 48 // the appropriate subclass type. |
| 49 void deref() | 49 void deref() |
| 50 { | 50 { |
| 51 if (derefBase()) | 51 if (derefBase()) |
| 52 destroy(); | 52 destroy(); |
| 53 } | 53 } |
| 54 #endif // !ENABLE(OILPAN) | 54 #endif // !ENABLE(OILPAN) |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 if (first == second) | 238 if (first == second) |
| 239 return true; | 239 return true; |
| 240 if (!first || !second) | 240 if (!first || !second) |
| 241 return false; | 241 return false; |
| 242 return first->equals(*second); | 242 return first->equals(*second); |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace blink | 245 } // namespace blink |
| 246 | 246 |
| 247 #endif // CSSValueObject_h | 247 #endif // CSSValueObject_h |
| OLD | NEW |