OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 virtual void trace(Visitor* visitor) | 87 virtual void trace(Visitor* visitor) |
88 { | 88 { |
89 visitor->trace(m_ownerList); | 89 visitor->trace(m_ownerList); |
90 } | 90 } |
91 | 91 |
92 protected: | 92 protected: |
93 explicit SVGPropertyBase(AnimatedPropertyType type) | 93 explicit SVGPropertyBase(AnimatedPropertyType type) |
94 : m_type(type) | 94 : m_type(type) |
95 , m_ownerList(nullptr) | 95 , m_ownerList(nullptr) |
96 { | 96 { |
| 97 #if ENABLE(OILPAN) |
| 98 // FIXME: Oilpan: the objects that derive from this RefCountedGarbageCol
lected<> |
| 99 // base object are all RefPtr<T>-exposed (i.e., create()s returning a Pa
ssRefPtr<T>.) |
| 100 // |
| 101 // Following r183582, RefCountedGarbageCollected<>::m_refCount is initia
lized |
| 102 // as 0, which is safe assuming the constructor result is initially hand
led/returned |
| 103 // as a raw pointer. But to support an "RefCounted-identical" view of su
ch a fresh |
| 104 // object, we need to adjust the RefCountedGarbageCollected<>::m_refCoun
t to be |
| 105 // its assumed 1 for these derived objects to function as expected. |
| 106 // |
| 107 // This would be simpler if the derived SVG property objects created GCe
d objects |
| 108 // proper. Remove this ref count adjustment when this happens. |
| 109 ref(); |
| 110 #endif |
97 } | 111 } |
98 | 112 |
99 private: | 113 private: |
100 const AnimatedPropertyType m_type; | 114 const AnimatedPropertyType m_type; |
101 | 115 |
102 RawPtrWillBeMember<SVGPropertyBase> m_ownerList; | 116 RawPtrWillBeMember<SVGPropertyBase> m_ownerList; |
103 }; | 117 }; |
104 | 118 |
105 } | 119 } |
106 | 120 |
107 #endif // SVGProperty_h | 121 #endif // SVGProperty_h |
OLD | NEW |