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

Side by Side Diff: Source/core/css/CSSValueObject.h

Issue 1226273002: CSSValue Immediates: Make CSSPrimitiveValue store a tagged pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_2_attempt_2
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « Source/core/css/CSSValue.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/css/CSSValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698