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

Unified Diff: Source/core/dom/Document.cpp

Issue 184813005: Make Document::implementation() method return reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 9cd3a9f7679d3c1801f958ac83661fa97b265316..71974085a0ab0874efc0aff9f49d14d6edad13ee 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -674,11 +674,11 @@ void Document::setDoctype(PassRefPtr<DocumentType> docType)
clearStyleResolver();
}
-DOMImplementation* Document::implementation()
+DOMImplementation& Document::implementation()
{
if (!m_implementation)
m_implementation = DOMImplementation::create(*this);
- return m_implementation.get();
+ return *m_implementation;
}
bool Document::hasManifest() const
@@ -1148,7 +1148,7 @@ void Document::setContentLanguage(const AtomicString& language)
void Document::setXMLVersion(const String& version, ExceptionState& exceptionState)
{
- if (!implementation()->hasFeature("XML", String())) {
+ if (!implementation().hasFeature("XML", String())) {
exceptionState.throwDOMException(NotSupportedError, "This document does not support XML.");
return;
}
@@ -1163,7 +1163,7 @@ void Document::setXMLVersion(const String& version, ExceptionState& exceptionSta
void Document::setXMLStandalone(bool standalone, ExceptionState& exceptionState)
{
- if (!implementation()->hasFeature("XML", String())) {
+ if (!implementation().hasFeature("XML", String())) {
exceptionState.throwDOMException(NotSupportedError, "This document does not support XML.");
return;
}
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698