Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index f1dd98641183bbe1dade7499e0fca23b60f5a2dc..85bb1123c2a2a7badd350050bcc068b3af67dfd7 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -3754,7 +3754,7 @@ void Document::setCookie(const String& value, ExceptionState& exceptionState) |
setCookies(this, cookieURL, value); |
} |
-AtomicString Document::referrer() const |
+const AtomicString& Document::referrer() const |
{ |
if (loader()) |
return loader()->request().httpReferrer(); |
@@ -3810,12 +3810,12 @@ String Document::lastModified() const |
DateComponents date; |
bool foundDate = false; |
if (m_frame) { |
- String httpLastModified; |
- if (DocumentLoader* documentLoader = loader()) |
- httpLastModified = documentLoader->response().httpHeaderField("Last-Modified"); |
- if (!httpLastModified.isEmpty()) { |
- date.setMillisecondsSinceEpochForDateTime(parseDate(httpLastModified)); |
- foundDate = true; |
+ if (DocumentLoader* documentLoader = loader()) { |
+ const AtomicString& httpLastModified = documentLoader->response().httpHeaderField("Last-Modified"); |
+ if (!httpLastModified.isEmpty()) { |
+ date.setMillisecondsSinceEpochForDateTime(parseDate(httpLastModified)); |
+ foundDate = true; |
+ } |
} |
} |
// FIXME: If this document came from the file system, the HTML5 |