Index: Source/core/html/track/TextTrackCue.cpp |
diff --git a/Source/core/html/track/TextTrackCue.cpp b/Source/core/html/track/TextTrackCue.cpp |
index 1625698eb2845b6a46e0be76298895577049856c..6648b225d356206781ac4d5836f6514693ef04a9 100644 |
--- a/Source/core/html/track/TextTrackCue.cpp |
+++ b/Source/core/html/track/TextTrackCue.cpp |
@@ -92,7 +92,7 @@ static const String& verticalGrowingRightKeyword() |
// ---------------------------- |
-TextTrackCueBox::TextTrackCueBox(Document* document, TextTrackCue* cue) |
+TextTrackCueBox::TextTrackCueBox(Document& document, TextTrackCue* cue) |
: HTMLDivElement(divTag, document) |
, m_cue(cue) |
{ |
@@ -204,7 +204,7 @@ TextTrackCue::TextTrackCue(ScriptExecutionContext* context, double start, double |
, m_isActive(false) |
, m_pauseOnExit(false) |
, m_snapToLines(true) |
- , m_cueBackgroundBox(HTMLDivElement::create(toDocument(context))) |
+ , m_cueBackgroundBox(HTMLDivElement::create(*toDocument(context))) |
, m_displayTreeShouldChange(true) |
, m_displayDirection(CSSValueLtr) |
{ |
@@ -228,7 +228,8 @@ TextTrackCue::~TextTrackCue() |
PassRefPtr<TextTrackCueBox> TextTrackCue::createDisplayTree() |
{ |
- return TextTrackCueBox::create(ownerDocument(), this); |
+ ASSERT(ownerDocument()); |
+ return TextTrackCueBox::create(*ownerDocument(), this); |
} |
PassRefPtr<TextTrackCueBox> TextTrackCue::displayTreeInternal() |