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

Issue 2393113002: ImageResource: Reset the encoded image size after receiving all data (Closed)

Created:
4 years, 2 months ago by hajimehoshi
Modified:
4 years, 2 months ago
Reviewers:
hiroshige, haraken, yhirano
CC:
chromium-reviews, tyoshino+watch_chromium.org, Yoav Weiss, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ImageResource: Reset the encoded image size after receiving all data Before this CL, an ImageResource's encoded image size remains non-zero even after the encoded data is cleared. This CL fixes this to make Resource::onMemoryDump report more accurate size. BUG=618623, 643135 TEST=webkit_unit_tests --gtest_filter=ImageResourceTest.* Committed: https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2 Cr-Commit-Position: refs/heads/master@{#426754}

Patch Set 1 #

Total comments: 2

Patch Set 2 : (rebasing) #

Patch Set 3 : Add encodedSizeMemoryUsage #

Patch Set 4 : Fix comments #

Patch Set 5 : Remove unnecessary change #

Total comments: 4

Patch Set 6 : Address on yhirano's review #

Total comments: 4

Patch Set 7 : Rename encodedSizeMemoryUsage -> encodedSizeMemoryUsageForTesting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -4 lines) Patch
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 2 3 4 5 6 3 chunks +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 3 chunks +10 lines, -4 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 51 (28 generated)
hajimehoshi
PTAL
4 years, 2 months ago (2016-10-05 05:58:10 UTC) #4
haraken
https://codereview.chromium.org/2393113002/diff/1/third_party/WebKit/Source/core/fetch/ImageResource.cpp File third_party/WebKit/Source/core/fetch/ImageResource.cpp (right): https://codereview.chromium.org/2393113002/diff/1/third_party/WebKit/Source/core/fetch/ImageResource.cpp#newcode423 third_party/WebKit/Source/core/fetch/ImageResource.cpp:423: setEncodedSize(0); Would it be better to move setEncodedSize into ...
4 years, 2 months ago (2016-10-05 05:59:39 UTC) #5
hajimehoshi
https://codereview.chromium.org/2393113002/diff/1/third_party/WebKit/Source/core/fetch/ImageResource.cpp File third_party/WebKit/Source/core/fetch/ImageResource.cpp (right): https://codereview.chromium.org/2393113002/diff/1/third_party/WebKit/Source/core/fetch/ImageResource.cpp#newcode423 third_party/WebKit/Source/core/fetch/ImageResource.cpp:423: setEncodedSize(0); On 2016/10/05 05:59:39, haraken wrote: > > Would ...
4 years, 2 months ago (2016-10-05 06:04:31 UTC) #6
haraken
LGTM
4 years, 2 months ago (2016-10-05 06:04:57 UTC) #7
yhirano
Tests are failing.
4 years, 2 months ago (2016-10-06 01:32:20 UTC) #10
hajimehoshi
On 2016/10/06 01:32:20, yhirano wrote: > Tests are failing. Couldn't reproduce them on my local ...
4 years, 2 months ago (2016-10-06 10:10:30 UTC) #13
hajimehoshi
On 2016/10/06 10:10:30, hajimehoshi wrote: > On 2016/10/06 01:32:20, yhirano wrote: > > Tests are ...
4 years, 2 months ago (2016-10-07 08:59:06 UTC) #18
ssid
On 2016/10/07 08:59:06, hajimehoshi wrote: > On 2016/10/06 10:10:30, hajimehoshi wrote: > > On 2016/10/06 ...
4 years, 2 months ago (2016-10-13 02:59:35 UTC) #19
hajimehoshi
On 2016/10/13 02:59:35, ssid wrote: > On 2016/10/07 08:59:06, hajimehoshi wrote: > > On 2016/10/06 ...
4 years, 2 months ago (2016-10-13 11:26:28 UTC) #22
haraken
LGTM
4 years, 2 months ago (2016-10-13 11:28:21 UTC) #23
hajimehoshi
yhirano: As we discussed offline, I've removed unnecessary change in MemoryCache, which was my misunderstanding. ...
4 years, 2 months ago (2016-10-14 09:13:11 UTC) #30
yhirano
https://codereview.chromium.org/2393113002/diff/80001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2393113002/diff/80001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode803 third_party/WebKit/Source/core/fetch/Resource.cpp:803: void Resource::setEncodedSizeMemoryUsage(size_t encodedSize) { Can you remove this function, ...
4 years, 2 months ago (2016-10-14 09:20:00 UTC) #31
hajimehoshi
Thank you! https://codereview.chromium.org/2393113002/diff/80001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2393113002/diff/80001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode803 third_party/WebKit/Source/core/fetch/Resource.cpp:803: void Resource::setEncodedSizeMemoryUsage(size_t encodedSize) { On 2016/10/14 09:20:00, ...
4 years, 2 months ago (2016-10-14 09:29:52 UTC) #32
yhirano
https://codereview.chromium.org/2393113002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.h File third_party/WebKit/Source/core/fetch/Resource.h (right): https://codereview.chromium.org/2393113002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.h#newcode185 third_party/WebKit/Source/core/fetch/Resource.h:185: size_t encodedSizeMemoryUsage() const { return m_encodedSizeMemoryUsage; } Can you ...
4 years, 2 months ago (2016-10-17 05:25:16 UTC) #37
yhirano
lgtm
4 years, 2 months ago (2016-10-17 09:00:14 UTC) #38
hajimehoshi
hiroshige: Are you happy with this change?
4 years, 2 months ago (2016-10-18 04:37:43 UTC) #39
yhirano
On 2016/10/18 04:37:43, hajimehoshi wrote: > hiroshige: Are you happy with this change? hajimehoshi@: Please ...
4 years, 2 months ago (2016-10-19 00:41:26 UTC) #40
hiroshige
lgtm. Could you add 643135 to BUG in the CL description? https://codereview.chromium.org/2393113002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.h File third_party/WebKit/Source/core/fetch/Resource.h (right): ...
4 years, 2 months ago (2016-10-19 04:04:01 UTC) #41
yhirano
https://codereview.chromium.org/2393113002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.h File third_party/WebKit/Source/core/fetch/Resource.h (right): https://codereview.chromium.org/2393113002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.h#newcode185 third_party/WebKit/Source/core/fetch/Resource.h:185: size_t encodedSizeMemoryUsage() const { return m_encodedSizeMemoryUsage; } On 2016/10/19 ...
4 years, 2 months ago (2016-10-19 05:36:11 UTC) #42
hajimehoshi
Thank you! https://codereview.chromium.org/2393113002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.h File third_party/WebKit/Source/core/fetch/Resource.h (right): https://codereview.chromium.org/2393113002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.h#newcode185 third_party/WebKit/Source/core/fetch/Resource.h:185: size_t encodedSizeMemoryUsage() const { return m_encodedSizeMemoryUsage; } ...
4 years, 2 months ago (2016-10-21 06:41:23 UTC) #44
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/2393113002/120001
4 years, 2 months ago (2016-10-21 06:41:47 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 2 months ago (2016-10-21 08:57:43 UTC) #49
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:28:19 UTC) #51
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2
Cr-Commit-Position: refs/heads/master@{#426754}

Powered by Google App Engine
This is Rietveld 408576698