ASSERTION FAILED: m_origin || m_type == CachedResource::MainResource
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2016 11:46:52 +0000 (11:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2016 11:46:52 +0000 (11:46 +0000)
commit7899626d9576a08d28bc2f506e3e076774db6a9c
treefeafbed0d58a663bd1190605e0cf758f758a50e4
parentd0eb3b8a1804c618a749bcd333f629d639a4ffbb
ASSERTION FAILED: m_origin || m_type == CachedResource::MainResource
https://bugs.webkit.org/show_bug.cgi?id=162472
<rdar://problem/28431522>

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

No change of behavior.

Introducing a new CachedResource constructor for already loaded resources.
Sharing code with the other constructor in the init method.
The main difference with this new constructor is that the resource has no specified origin.
The response tainting remains Basic.

Making some additional code clean-up.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage): Making use of the new constructor.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::finishRequestInitialization):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::type):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResource.h