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

Unified Diff: Source/core/xml/XMLHttpRequest.h

Issue 102103002: Have HashMap<KeyType, AtomicString>::get() return a const reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
Index: Source/core/xml/XMLHttpRequest.h
diff --git a/Source/core/xml/XMLHttpRequest.h b/Source/core/xml/XMLHttpRequest.h
index dfb585e3504e66a475c303ff0bcd54d095651ba2..5c02766b3a3d89043e78b82a794e40aa53640a54 100644
--- a/Source/core/xml/XMLHttpRequest.h
+++ b/Source/core/xml/XMLHttpRequest.h
@@ -113,7 +113,7 @@ public:
void setRequestHeader(const AtomicString& name, const AtomicString& value, ExceptionState&);
void overrideMimeType(const AtomicString& override);
String getAllResponseHeaders(ExceptionState&) const;
- AtomicString getResponseHeader(const AtomicString& name, ExceptionState&) const;
+ const AtomicString& getResponseHeader(const AtomicString& name, ExceptionState&) const;
ScriptString responseText(ExceptionState&);
ScriptString responseJSONSource();
Document* responseXML(ExceptionState&);
@@ -164,7 +164,7 @@ private:
bool initSend(ExceptionState&);
void sendBytesData(const void*, size_t, ExceptionState&);
- AtomicString getRequestHeader(const AtomicString& name) const;
+ const AtomicString& getRequestHeader(const AtomicString& name) const;
void setRequestHeaderInternal(const AtomicString& name, const AtomicString& value);
// Changes m_state and dispatches a readyStateChange event if new m_state

Powered by Google App Engine
This is Rietveld 408576698