Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 90a353c3f97e1b6f91a1c2547df6d3355fdbf59d..b235cbd55f534c1aa90e40bf4c7541eba101cfb1 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -794,7 +794,7 @@ bool Document::haveImportsLoaded() const |
PassRefPtr<DocumentFragment> Document::createDocumentFragment() |
{ |
- return DocumentFragment::create(&document()); |
+ return DocumentFragment::create(document()); |
} |
PassRefPtr<Text> Document::createTextNode(const String& data) |
@@ -5348,10 +5348,10 @@ Locale& Document::getCachedLocale(const AtomicString& locale) |
return *(result.iterator->value); |
} |
-Document* Document::ensureTemplateDocument() |
+Document& Document::ensureTemplateDocument() |
{ |
if (const Document* document = templateDocument()) |
- return const_cast<Document*>(document); |
+ return *const_cast<Document*>(document); |
if (isHTMLDocument()) { |
DocumentInit init = DocumentInit::fromContext(contextDocument(), blankURL()) |
@@ -5363,7 +5363,7 @@ Document* Document::ensureTemplateDocument() |
m_templateDocument->setTemplateDocumentHost(this); // balanced in dtor. |
- return m_templateDocument.get(); |
+ return *m_templateDocument.get(); |
} |
PassRefPtr<FontLoader> Document::fontloader() |