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

Issue 2182023002: Bug fix: Fix wrong assumption in ImageResource when adding observer (Closed)

Created:
4 years, 4 months ago by hajimehoshi
Modified:
4 years, 4 months ago
Reviewers:
hiroshige, Mike West
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Bug fix: Fix wrong assumption in ImageResource when adding observer When the response is not multipart, if |m_data| exists, |m_image| must be created. This is assured that |updateImage()| is called when |appendData()| is called. On the other hand, when the response is multipart, |updateImage()| is not called in |appendData()|, which means |m_image| might not be created even when |m_data| exists. This is intentional since creating a |m_image| on receiving data might destroy an existing image in a previous part. This CL fixes the wrong DCHECK in addObserver and didAddClient in ImageResource. BUG=630983 TEST=webkit_unit_tests --gtest_filter=ImageResourceTest.MultipartImage Committed: https://crrev.com/d1e1dd413401a3434537e12f1f12637e7c8bf2fb Cr-Commit-Position: refs/heads/master@{#408092}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address on hiroshige's review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -2 lines) Patch
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 2 chunks +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp View 1 2 chunks +8 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 18 (10 generated)
hajimehoshi
PTAL
4 years, 4 months ago (2016-07-26 07:52:15 UTC) #2
hiroshige
https://codereview.chromium.org/2182023002/diff/1/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp File third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp (right): https://codereview.chromium.org/2182023002/diff/1/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp#newcode254 third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp:254: ASSERT_TRUE(client->notifyFinishedCalled()); Could you confirm that |client2| is also notified, ...
4 years, 4 months ago (2016-07-27 08:13:40 UTC) #7
hajimehoshi
Thank you! https://codereview.chromium.org/2182023002/diff/1/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp File third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp (right): https://codereview.chromium.org/2182023002/diff/1/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp#newcode254 third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp:254: ASSERT_TRUE(client->notifyFinishedCalled()); On 2016/07/27 08:13:40, hiroshige wrote: > ...
4 years, 4 months ago (2016-07-27 08:26:30 UTC) #8
Mike West
LGTM
4 years, 4 months ago (2016-07-27 08:37:54 UTC) #11
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/2182023002/20001
4 years, 4 months ago (2016-07-27 08:40:44 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-07-27 11:00:04 UTC) #15
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/d1e1dd413401a3434537e12f1f12637e7c8bf2fb Cr-Commit-Position: refs/heads/master@{#408092}
4 years, 4 months ago (2016-07-27 11:01:53 UTC) #17
hiroshige
4 years, 4 months ago (2016-07-27 11:14:34 UTC) #18
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698