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

Unified Diff: Source/core/svg/animation/SMILTimeContainer.h

Issue 304453002: Prepare SMILTimeContainer for oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: change containers and evict invalid keys manually Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/animation/SMILTimeContainer.h
diff --git a/Source/core/svg/animation/SMILTimeContainer.h b/Source/core/svg/animation/SMILTimeContainer.h
index 84925746f63cdf17080a2b70737b22177b1c4cae..35f960fb8e5ffa50f4a4ec2391bf66912bf7dff2 100644
--- a/Source/core/svg/animation/SMILTimeContainer.h
+++ b/Source/core/svg/animation/SMILTimeContainer.h
@@ -29,6 +29,7 @@
#include "core/dom/QualifiedName.h"
#include "core/svg/animation/SMILTime.h"
#include "platform/Timer.h"
+#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
#include "wtf/PassRefPtr.h"
@@ -43,9 +44,9 @@ class SVGElement;
class SVGSMILElement;
class SVGSVGElement;
-class SMILTimeContainer : public RefCounted<SMILTimeContainer> {
+class SMILTimeContainer : public RefCountedWillBeGarbageCollectedFinalized<SMILTimeContainer> {
public:
- static PassRefPtr<SMILTimeContainer> create(SVGSVGElement& owner) { return adoptRef(new SMILTimeContainer(owner)); }
+ static PassRefPtrWillBeRawPtr<SMILTimeContainer> create(SVGSVGElement& owner) { return adoptRefWillBeNoop(new SMILTimeContainer(owner)); }
~SMILTimeContainer();
void schedule(SVGSMILElement*, SVGElement*, const QualifiedName&);
@@ -67,8 +68,10 @@ public:
void setDocumentOrderIndexesDirty() { m_documentOrderIndexesDirty = true; }
+ void trace(Visitor*);
+
private:
- SMILTimeContainer(SVGSVGElement& owner);
+ explicit SMILTimeContainer(SVGSVGElement& owner);
enum FrameSchedulingState {
// No frame scheduled.
@@ -108,9 +111,10 @@ private:
Timer<SMILTimeContainer> m_wakeupTimer;
- typedef pair<SVGElement*, QualifiedName> ElementAttributePair;
- typedef Vector<SVGSMILElement*> AnimationsVector;
- typedef HashMap<ElementAttributePair, OwnPtr<AnimationsVector> > GroupedAnimationsMap;
+ typedef pair<RawPtrWillBeWeakMember<SVGElement>, QualifiedName> ElementAttributePair;
+ typedef WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<SVGSMILElement> > AnimationsLinkedHashSet;
+ typedef WillBeHeapVector<RefPtrWillBeMember<SVGSMILElement> > AnimationsVector;
haraken 2014/05/27 08:25:56 Can we move this typedef to the cpp file?
kouhei (in TOK) 2014/05/28 01:00:50 Done.
+ typedef WillBeHeapHashMap<ElementAttributePair, OwnPtrWillBeMember<AnimationsLinkedHashSet> > GroupedAnimationsMap;
GroupedAnimationsMap m_scheduledAnimations;
SVGSVGElement& m_ownerSVGElement;

Powered by Google App Engine
This is Rietveld 408576698