Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 5721682d37bbe6c898fe8031d0ab2fa09ba1da97..d2c1dc97de8a837e93e7f5538f1ea594fb0cdc03 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -3752,7 +3752,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(); |
@@ -3808,12 +3808,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 |