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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSValue.h

Issue 1474213002: [PartitionAlloc] Annotate common Blink types for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ctti
Patch Set: Mark template specialisations as WTF_EXPORT Created 5 years 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 * (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 14 matching lines...) Expand all
25 #include "platform/heap/Handle.h" 25 #include "platform/heap/Handle.h"
26 #include "platform/weborigin/KURL.h" 26 #include "platform/weborigin/KURL.h"
27 #include "wtf/HashMap.h" 27 #include "wtf/HashMap.h"
28 #include "wtf/ListHashSet.h" 28 #include "wtf/ListHashSet.h"
29 #include "wtf/RefCounted.h" 29 #include "wtf/RefCounted.h"
30 #include "wtf/RefPtr.h" 30 #include "wtf/RefPtr.h"
31 31
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 #if ENABLE(OILPAN)
35 public: 36 public:
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, false); 42 return allocateObject(size, false);
43 } 43 }
44 static void* allocateObject(size_t size, bool isEager) 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, isEager ? BlinkGC::EagerSw eepHeapIndex : BlinkGC::CSSValueHeapIndex, GCInfoTrait<CSSValue>::index()); 47 return Heap::allocateOnHeapIndex(state, size, isEager ? BlinkGC::EagerSw eepHeapIndex : BlinkGC::CSSValueHeapIndex, GCInfoTrait<CSSValue>::index());
48 } 48 }
49 #else 49 #else
50 USING_FAST_MALLOC_WITH_TYPE_NAME(blink::CSSValue);
51 public:
50 // Override RefCounted's deref() to ensure operator delete is called on 52 // Override RefCounted's deref() to ensure operator delete is called on
51 // the appropriate subclass type. 53 // the appropriate subclass type.
52 void deref() 54 void deref()
53 { 55 {
54 if (derefBase()) 56 if (derefBase())
55 destroy(); 57 destroy();
56 } 58 }
57 #endif // !ENABLE(OILPAN) 59 #endif // !ENABLE(OILPAN)
58 60
59 String cssText() const; 61 String cssText() const;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return false; 267 return false;
266 return first->equals(*second); 268 return first->equals(*second);
267 } 269 }
268 270
269 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ 271 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \
270 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te) 272 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te)
271 273
272 } // namespace blink 274 } // namespace blink
273 275
274 #endif // CSSValue_h 276 #endif // CSSValue_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.h ('k') | third_party/WebKit/Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698