Make CachedResourceLoader originsMatch check more efficient
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Oct 2016 08:08:11 +0000 (08:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Oct 2016 08:08:11 +0000 (08:08 +0000)
commit1ac8dca980da55297f3b44c0e9279cfd8f06b9b6
tree24fb92bde49257d31894d2af274be8d236839dd6
parent70ccc545400134c34fa23378c7f65083d700f245
Make CachedResourceLoader originsMatch check more efficient
https://bugs.webkit.org/show_bug.cgi?id=163938

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-26
Reviewed by Darin Adler.

No change of behavior.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest):
(WebCore::originsMatch): Moved to SecurityOrigin.cpp.
* page/SecurityOrigin.cpp:
(WebCore::areOriginsMatching): Helper routine to check whether origins are matching.
(WebCore::originsMatch): Ensuring string comparison provides the same result as this function.
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::protocol):
(WebCore::SecurityOrigin::host):
(WebCore::SecurityOrigin::domain):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/page/SecurityOrigin.cpp
Source/WebCore/page/SecurityOrigin.h