Chromium Code Reviews| Index: Source/core/html/track/vtt/VTTCue.h |
| diff --git a/Source/core/html/track/vtt/VTTCue.h b/Source/core/html/track/vtt/VTTCue.h |
| index 2247f019f4ec84396f6ba613e4d34dde8b85a7f7..6e47718f59e8dbf10f4e5d3e02075dc8560872d0 100644 |
| --- a/Source/core/html/track/vtt/VTTCue.h |
| +++ b/Source/core/html/track/vtt/VTTCue.h |
| @@ -32,6 +32,7 @@ |
| #include "bindings/v8/ScriptWrappable.h" |
| #include "core/html/track/TextTrackCue.h" |
| +#include "platform/heap/Handle.h" |
| namespace WebCore { |
| @@ -55,14 +56,14 @@ private: |
| virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
| - VTTCue* m_cue; |
| + RawPtrWillBePersistent<VTTCue> m_cue; |
|
Mads Ager (chromium)
2014/04/22 13:07:15
This looks like a leak?
We have a RefPtr from VTT
sof
2014/04/22 14:02:48
Done (and removed RawPtrWillBePersistent in the pr
|
| }; |
| class VTTCue FINAL : public TextTrackCue, public ScriptWrappable { |
| public: |
| - static PassRefPtr<VTTCue> create(Document& document, double startTime, double endTime, const String& text) |
| + static PassRefPtrWillBeRawPtr<VTTCue> create(Document& document, double startTime, double endTime, const String& text) |
| { |
| - return adoptRef(new VTTCue(document, startTime, endTime, text)); |
| + return adoptRefWillBeRefCountedGarbageCollected(new VTTCue(document, startTime, endTime, text)); |
| } |
| virtual ~VTTCue(); |
| @@ -137,6 +138,8 @@ public: |
| virtual String toString() const OVERRIDE; |
| #endif |
| + virtual void trace(Visitor*) OVERRIDE; |
| + |
| private: |
| VTTCue(Document&, double startTime, double endTime, const String& text); |