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 20:19:36 +0000 (20:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2016 20:19:36 +0000 (20:19 +0000)
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 Chris Dumez.

Covered by existing tests.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage): Fixing the last CachedImage constructor.
Using CachedResource protected constructor.
* loader/cache/CachedResource.h: Small clean-up.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206388 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedResource.h

index da52264..5bdeef9 100644 (file)
@@ -1,5 +1,20 @@
 2016-09-26  Youenn Fablet  <youenn@apple.com>
 
+        ASSERTION FAILED: m_origin || m_type == CachedResource::MainResource
+        https://bugs.webkit.org/show_bug.cgi?id=162472
+        <rdar://problem/28431522>
+
+        Reviewed by Chris Dumez.
+
+        Covered by existing tests.
+
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::CachedImage): Fixing the last CachedImage constructor.
+        Using CachedResource protected constructor.
+        * loader/cache/CachedResource.h: Small clean-up.
+
+2016-09-26  Youenn Fablet  <youenn@apple.com>
+
         [GTK][EFL] imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html is failing
         https://bugs.webkit.org/show_bug.cgi?id=162547
 
index b93a8a5..d0c9a11 100644 (file)
@@ -82,7 +82,7 @@ CachedImage::CachedImage(const URL& url, Image* image, SessionID sessionID)
 }
 
 CachedImage::CachedImage(const URL& url, Image* image, CachedImage::CacheBehaviorType type, SessionID sessionID)
-    : CachedResource(CachedResourceRequest(ResourceRequest(url)), ImageResource, sessionID)
+    : CachedResource(url, ImageResource, sessionID)
     , m_image(image)
     , m_isManuallyCached(type == CachedImage::ManuallyCached)
     , m_shouldPaintBrokenImage(true)
index fb66e92..d6a01b6 100644 (file)
@@ -335,7 +335,7 @@ private:
     unsigned m_handleCount { 0 };
     unsigned m_preloadCount { 0 };
 
-    unsigned m_preloadResult { PreloadNotReferenced };
+    PreloadResult m_preloadResult { PreloadNotReferenced };
 
     bool m_requestedFromNetworkingLayer { false };