LinkLoader fails to remove CachedResourceClient in some cases
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2018 19:05:36 +0000 (19:05 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2018 19:05:36 +0000 (19:05 +0000)
commitc0a4261e2072777cc0cbf01be3f9c7a5797eac3f
treef55a35596b9ba2a3d944bce6763fc7eaf91e0dd3
parent9ac07a660a1d1225bf3213a66a63c8249ad24ed1
LinkLoader fails to remove CachedResourceClient in some cases
https://bugs.webkit.org/show_bug.cgi?id=185553
<rdar://problem/36879656>

Reviewed by Geoffrey Garen.

Source/WebCore:

Test: http/tests/preload/link-preload-client-remove.html

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):

If there is a link preload already in progress, we fail to clear the client for the ongoing load.
This may leave the CachedResource client map in a bad state.

LayoutTests:

* http/tests/preload/link-preload-client-remove-expected.txt: Added.
* http/tests/preload/link-preload-client-remove.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/preload/link-preload-client-remove-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/preload/link-preload-client-remove.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/loader/LinkLoader.cpp