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

Issue 2642823005: Phase II Step 1: Remove updateImage() reentrancy around decodeError() (Closed)

Created:
3 years, 11 months ago by hiroshige
Modified:
3 years, 10 months ago
CC:
chromium-reviews, blink-reviews, loading-reviews_chromium.org, tyoshino+watch_chromium.org, Nate Chapin, gavinp+loader_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Phase II Step 1: Remove updateImage() reentrancy around decodeError() Design doc: https://docs.google.com/document/d/1O-fB83mrE0B_V8gzXNqHgmRLCvstTB4MMi3RnVLr8bE/edit#heading=h.1rxkos5samv7 Previously, ImageResourceContent::updateImage() is reentered when DecodeError occurred in ImageResource. This CL removes the reentrancy and ImageResourceInfo::decodeError() by 1. making ImageResourceContent::updateImage() to return ShouldDecodeError without calling notifyObservers() when an decode error occurs, 2. then making ImageResource::updateImage() to call ImageResource::decodeError(), and 3. then making ImageResource::decodeError() to call notifyObservers() (via ImageResourceContent::updateImage()) if necessary. This CL also adds DCHECK() for prohibiting reentering to ImageResourceContent::updateImage(). In the case of a decode error inside didReceiveData(), this CL removes one imageChanged() call, which looks unnecessary. BUG=667641, 677188 Review-Url: https://codereview.chromium.org/2642823005 Cr-Commit-Position: refs/heads/master@{#451996} Committed: https://chromium.googlesource.com/chromium/src/+/bd8c80c437ceaa8427186bbbbd3040ae17d6d13d

Patch Set 1 #

Patch Set 2 : Fix the case of decode error with empty body #

Patch Set 3 : Rebase. #

Patch Set 4 : fix rebase errors #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase. #

Patch Set 7 : Rebase #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase #

Patch Set 11 : Rebase #

Patch Set 12 : Rebase #

Total comments: 2

Patch Set 13 : Rebase. #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -20 lines) Patch
M third_party/WebKit/Source/core/loader/resource/ImageResource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +26 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +12 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/loader/resource/ImageResourceInfo.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 68 (61 generated)
hiroshige
PTAL. https://codereview.chromium.org/2642823005/diff/220001/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp File third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp (right): https://codereview.chromium.org/2642823005/diff/220001/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp#newcode925 third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp:925: EXPECT_EQ(1, observer->imageChangedCount()); As mentioned in the design doc ...
3 years, 11 months ago (2017-01-25 02:49:16 UTC) #45
yhirano
> (in the design doc) Also, we also refactor DecodeError handling because > there are ...
3 years, 11 months ago (2017-01-25 09:50:04 UTC) #48
hiroshige
On 2017/01/25 09:50:04, yhirano wrote: > > (in the design doc) Also, we also refactor ...
3 years, 11 months ago (2017-01-26 01:14:23 UTC) #49
yhirano
Thanks, lgtm.
3 years, 10 months ago (2017-01-27 10:16:19 UTC) #50
commit-bot: I haz the power
This CL has an open dependency (Issue 2650543003 Patch 120001). Please resolve the dependency and ...
3 years, 10 months ago (2017-01-27 22:37:33 UTC) #53
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/2642823005/260001
3 years, 10 months ago (2017-02-22 07:34:22 UTC) #65
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 11:22:45 UTC) #68
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/bd8c80c437ceaa8427186bbbbd30...

Powered by Google App Engine
This is Rietveld 408576698