Index: Source/core/fetch/ImageResource.cpp |
diff --git a/Source/core/fetch/ImageResource.cpp b/Source/core/fetch/ImageResource.cpp |
index 2a735e15352170d24c8dd6842e99fcd78cce57d7..f0e5d38b1a83e699f51edae8cd9076a55df05336 100644 |
--- a/Source/core/fetch/ImageResource.cpp |
+++ b/Source/core/fetch/ImageResource.cpp |
@@ -127,15 +127,15 @@ void ImageResource::allClientsRemoved() |
Resource::allClientsRemoved(); |
} |
-pair<WebCore::Image*, float> ImageResource::brokenImage(float deviceScaleFactor) const |
+pair<WebCore::Image*, float> ImageResource::brokenImage(float deviceScaleFactor) |
{ |
if (deviceScaleFactor >= 2) { |
- DEFINE_STATIC_LOCAL(WebCore::Image*, brokenImageHiRes, (WebCore::Image::loadPlatformResource("missingImage@2x").leakRef())); |
- return std::make_pair(brokenImageHiRes, 2); |
+ DEFINE_STATIC_LOCAL(RefPtr<WebCore::Image>, brokenImageHiRes, (WebCore::Image::loadPlatformResource("missingImage@2x"))); |
+ return std::make_pair(brokenImageHiRes.get(), 2); |
} |
- DEFINE_STATIC_LOCAL(WebCore::Image*, brokenImageLoRes, (WebCore::Image::loadPlatformResource("missingImage").leakRef())); |
- return std::make_pair(brokenImageLoRes, 1); |
+ DEFINE_STATIC_LOCAL(RefPtr<WebCore::Image>, brokenImageLoRes, (WebCore::Image::loadPlatformResource("missingImage"))); |
+ return std::make_pair(brokenImageLoRes.get(), 1); |
} |
bool ImageResource::willPaintBrokenImage() const |