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

Side by Side Diff: Source/core/svg/properties/SVGProperty.h

Issue 1328223002: Avoid a SVG property list-induced leak (Oilpan). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/svg/SVGPathSegList.cpp ('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 * 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 void setOwnerList(SVGPropertyBase* ownerList) 83 void setOwnerList(SVGPropertyBase* ownerList)
84 { 84 {
85 // Previous owner list must be cleared before setting new owner list. 85 // Previous owner list must be cleared before setting new owner list.
86 ASSERT((!ownerList && m_ownerList) || (ownerList && !m_ownerList)); 86 ASSERT((!ownerList && m_ownerList) || (ownerList && !m_ownerList));
87 87
88 m_ownerList = ownerList; 88 m_ownerList = ownerList;
89 } 89 }
90 90
91 DEFINE_INLINE_VIRTUAL_TRACE() 91 DEFINE_INLINE_VIRTUAL_TRACE() { }
92 {
93 visitor->trace(m_ownerList);
94 }
95 92
96 protected: 93 protected:
97 explicit SVGPropertyBase(AnimatedPropertyType type) 94 explicit SVGPropertyBase(AnimatedPropertyType type)
98 : m_type(type) 95 : m_type(type)
99 , m_ownerList(nullptr) 96 , m_ownerList(nullptr)
100 { 97 {
101 } 98 }
102 99
103 private: 100 private:
104 const AnimatedPropertyType m_type; 101 const AnimatedPropertyType m_type;
105 102
106 RawPtrWillBeMember<SVGPropertyBase> m_ownerList; 103 // Oilpan: the back reference to the owner should be a Member, but this can create
104 // cycles when SVG properties meet the off-heap InterpolationValue hierarchy .
105 // Not tracing it is safe, albeit an undesirable state of affairs.
106 GC_PLUGIN_IGNORE("528275")
107 SVGPropertyBase* m_ownerList;
107 }; 108 };
108 109
109 } 110 }
110 111
111 #endif // SVGProperty_h 112 #endif // SVGProperty_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathSegList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698