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

Issue 2173873003: Cancel image loads if decoding failed (attempt #2) (Closed)

Created:
4 years, 5 months ago by Nate Chapin
Modified:
4 years, 4 months ago
Reviewers:
pdr.
CC:
chromium-reviews, blink-reviews-platform-graphics_chromium.org, dshwang, fs, piman+watch_chromium.org, kouhei+svg_chromium.org, rwlbuis, Yoav Weiss, krit, drott+blinkwatch_chromium.org, Justin Novosad, Rik, gavinp+loader_chromium.org, blink-reviews, gyuyoung2, pdr+svgwatchlist_chromium.org, ajuma+watch_chromium.org, Peter Beverloo, jbroman, pdr+graphicswatchlist_chromium.org, haraken, loading-reviews+fetch_chromium.org, danakj+watch_chromium.org, tyoshino+watch_chromium.org, f(malita), Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cancel image loads if decoding failed (attempt #2) 'Cancel' isn't really the right word for what this change does. In the event of an image decoding failure, ImageResource will synthesize a call to ResourceLoader::didFinishLoading, killing the actual network request but reporting it as a successful completion to the rest of blink. This matches our traditional behavior of decoding errors looking like a successful resource load (for the most part). This requires some plumbing changes to image decoding, because the decoder selection logic doesn't report why it wasn't able to create an ImageDecoder. It might be because insufficient data has been received to sniff the image type, or it may be that we definitely don't have a valid image type. This change exposes enough information to tell the difference. BUG=471272 TBR=peter@chromium.org Committed: https://crrev.com/d3d417564b290e70dc50bab63dc22a8889924be3 Cr-Commit-Position: refs/heads/master@{#407555}

Patch Set 1 : As originally landed #

Patch Set 2 : Fix UAF #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -79 lines) Patch
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 1 2 chunks +14 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp View 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/exported/WebImage.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/BitmapImage.h View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/BitmapImage.cpp View 2 chunks +9 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTestWoPlatform.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/Image.h View 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Image.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageSource.h View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageSource.cpp View 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h View 2 chunks +16 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp View 1 chunk +38 lines, -22 lines 0 comments Download

Messages

Total messages: 24 (16 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2173873003/20001
4 years, 4 months ago (2016-07-25 17:11:13 UTC) #7
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 4 months ago (2016-07-25 17:11:15 UTC) #9
Nate Chapin
UAF fix! See the diffs between patchsets 1 and 2 for the fix.
4 years, 4 months ago (2016-07-25 19:01:54 UTC) #15
pdr.
On 2016/07/25 at 19:01:54, japhet wrote: > UAF fix! See the diffs between patchsets 1 ...
4 years, 4 months ago (2016-07-25 19:05:57 UTC) #16
Nate Chapin
On 2016/07/25 19:05:57, pdr. wrote: > On 2016/07/25 at 19:01:54, japhet wrote: > > UAF ...
4 years, 4 months ago (2016-07-25 19:26:49 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2173873003/20001
4 years, 4 months ago (2016-07-25 19:32:59 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-07-25 20:05:10 UTC) #22
commit-bot: I haz the power
4 years, 4 months ago (2016-07-25 20:07:26 UTC) #24
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d3d417564b290e70dc50bab63dc22a8889924be3
Cr-Commit-Position: refs/heads/master@{#407555}

Powered by Google App Engine
This is Rietveld 408576698