Don't use AtomicString in HTTPHeaderMap
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jun 2014 22:28:18 +0000 (22:28 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jun 2014 22:28:18 +0000 (22:28 +0000)
commitc2e52c49e60361c5c98d3e063aa99696afe7a578
treec47f4ad529980703d3a938fc1f49e0c2d2abbf45
parent8df1366345dc3d3bc3c69b3e76da9661f03e8f84
Don't use AtomicString in HTTPHeaderMap
https://bugs.webkit.org/show_bug.cgi?id=133957
<rdar://problem/15256572>

Reviewed by Andreas Kling.

Source/WebCore:
Use the string data that comes from the generated HTTPHeaderNames.cpp file
for sharing header name data instead. In the future we can do something more fancy where
we'll hash the HTTPHeaderName enum directly, but this is good enough for now.

* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readHTTPHeaders):
* WebCore.exp.in:
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForHeaders):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::parseHeader):
* loader/cache/CachedResource.cpp:
(WebCore::shouldUpdateHeaderAfterRevalidation):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::copyData):
(WebCore::internHTTPHeaderNameString):
(WebCore::HTTPHeaderMap::get):
(WebCore::HTTPHeaderMap::set):
(WebCore::HTTPHeaderMap::add):
(WebCore::CaseFoldingCStringTranslator::hash): Deleted.
(WebCore::CaseFoldingCStringTranslator::equal): Deleted.
(WebCore::CaseFoldingCStringTranslator::translate): Deleted.
* platform/network/HTTPHeaderMap.h:
* platform/network/HTTPHeaderNames.in:
* platform/network/HTTPParsers.cpp:
(WebCore::parseHTTPHeader):
* platform/network/HTTPParsers.h:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::httpHeaderField):
(WebCore::ResourceRequestBase::setHTTPHeaderField):
(WebCore::ResourceRequestBase::addHTTPHeaderField):
* platform/network/ResourceRequestBase.h:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::httpHeaderField):
(WebCore::ResourceResponseBase::setHTTPHeaderField):
(WebCore::ResourceResponseBase::addHTTPHeaderField):
* platform/network/ResourceResponseBase.h:
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setRequestHeader):
(WebCore::XMLHttpRequest::setRequestHeaderInternal):
(WebCore::XMLHttpRequest::getRequestHeader):
(WebCore::XMLHttpRequest::getResponseHeader):
* xml/XMLHttpRequest.h:

Source/WebKit2:
Update for WebCore changes.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::decode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
Source/WebCore/WebCore.exp.in
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/loader/CrossOriginPreflightResultCache.cpp
Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/platform/network/HTTPHeaderMap.cpp
Source/WebCore/platform/network/HTTPHeaderMap.h
Source/WebCore/platform/network/HTTPHeaderNames.in
Source/WebCore/platform/network/HTTPParsers.cpp
Source/WebCore/platform/network/HTTPParsers.h
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceRequestBase.h
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.h
Source/WebCore/platform/network/mac/ResourceRequestMac.mm
Source/WebCore/platform/network/mac/ResourceResponseMac.mm
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebCore/xml/XMLHttpRequest.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp