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

Unified Diff: Source/core/html/HTMLVideoElement.cpp

Issue 320253002: Oilpan: Prepare to move ImageLoader and its subclasses to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 6 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/html/HTMLVideoElement.cpp
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
index 4009845fde9f2db3b6f1f45f9bb48a584c6554ae..7e45f9bc017cc183018b1e5ba3d748de9a655817 100644
--- a/Source/core/html/HTMLVideoElement.cpp
+++ b/Source/core/html/HTMLVideoElement.cpp
@@ -61,6 +61,12 @@ PassRefPtrWillBeRawPtr<HTMLVideoElement> HTMLVideoElement::create(Document& docu
return video.release();
}
+void HTMLVideoElement::trace(Visitor* visitor)
+{
+ visitor->trace(m_imageLoader);
+ HTMLMediaElement::trace(visitor);
+}
+
bool HTMLVideoElement::rendererIsNeeded(const RenderStyle& style)
{
return HTMLElement::rendererIsNeeded(style);
@@ -78,7 +84,7 @@ void HTMLVideoElement::attach(const AttachContext& context)
updateDisplayState();
if (shouldDisplayPosterImage()) {
if (!m_imageLoader)
- m_imageLoader = adoptPtr(new HTMLImageLoader(this));
+ m_imageLoader = HTMLImageLoader::create(this);
m_imageLoader->updateFromElement();
if (renderer())
toRenderImage(renderer())->imageResource()->setImageResource(m_imageLoader->image());
@@ -110,7 +116,7 @@ void HTMLVideoElement::parseAttribute(const QualifiedName& name, const AtomicStr
updateDisplayState();
if (shouldDisplayPosterImage()) {
if (!m_imageLoader)
- m_imageLoader = adoptPtr(new HTMLImageLoader(this));
+ m_imageLoader = HTMLImageLoader::create(this);
m_imageLoader->updateFromElementIgnoringPreviousError();
} else {
if (renderer())

Powered by Google App Engine
This is Rietveld 408576698