Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: Source/core/page/PageSerializer.cpp

Issue 177243005: [SavePage] Do not save images with errors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed the unused variable. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/web/tests/WebPageNewSerializerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PageSerializer.cpp
diff --git a/Source/core/page/PageSerializer.cpp b/Source/core/page/PageSerializer.cpp
index 7f31c9c055639726f0477a0e03fa69a8af25ee07..c759769d5dfa1bc069a2c1f51b7ead4c424cf0fc 100644
--- a/Source/core/page/PageSerializer.cpp
+++ b/Source/core/page/PageSerializer.cpp
@@ -314,7 +314,7 @@ void PageSerializer::addImageToResources(ImageResource* image, RenderObject* ima
if (!shouldAddURL(url))
return;
- if (!image || image->image() == Image::nullImage())
+ if (!image || image->image() == Image::nullImage() || image->errorOccurred())
return;
RefPtr<SharedBuffer> data = imageRenderer ? image->imageForRenderer(imageRenderer)->data() : 0;
« no previous file with comments | « no previous file | Source/web/tests/WebPageNewSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698