New issue
Advanced search Search tips

Issue 643135 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Refactor setEncoded/DecodedSize() in Resource

Project Member Reported by hirosh...@chromium.org, Sep 1 2016

Issue description

Tracking issue for setEncoded/DecodedSize()-related refactoring.

 
Owner: hirosh...@chromium.org
Status: Started (was: Untriaged)
I'm creating some CLs to set encoded/decoded sizes more consistently.
This should include getters (encodedSize/decodedSize).
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2

commit 66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2
Author: hajimehoshi <hajimehoshi@chromium.org>
Date: Fri Oct 21 08:57:17 2016

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.*

Review-Url: https://chromiumcodereview.appspot.com/2393113002
Cr-Commit-Position: refs/heads/master@{#426754}

[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/ImageResource.cpp
[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/Resource.cpp
[modify] https://crrev.com/66658a10410c9f6d90dfbabbc3b3d6c9a366e0e2/third_party/WebKit/Source/core/fetch/Resource.h

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e95fdfd5cb10bc3f0e99916374b55d917d004f96

commit e95fdfd5cb10bc3f0e99916374b55d917d004f96
Author: hiroshige <hiroshige@chromium.org>
Date: Tue Nov 08 02:33:18 2016

Report the size of |ScriptResource::m_script| as decoded size

Previously, |m_script| was reported as encoded data, while it is not |m_data|.
This CL reports |m_script| as decoded data and call
setEncodedSizeMemoryUsage(0) instead, to prevent |m_script| from being
reported both as encoded and decoded data to memory-infra.

BUG= 643135 

Review-Url: https://codereview.chromium.org/2212393002
Cr-Commit-Position: refs/heads/master@{#430483}

[modify] https://crrev.com/e95fdfd5cb10bc3f0e99916374b55d917d004f96/third_party/WebKit/Source/core/fetch/ScriptResource.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71b354672add64227227bc3dec0e5462f1e0dda4

commit 71b354672add64227227bc3dec0e5462f1e0dda4
Author: hiroshige <hiroshige@chromium.org>
Date: Tue Nov 08 05:02:47 2016

Report the size of |CSSStyleSheetResource::m_decodedSheetText| as decoded size

Previously, |m_decodedSheetText| was reported as encoded data, while it is
not |m_data|.
This CL reports |m_decodedSheetText| as decoded data and call
setEncodedSizeMemoryUsage(0) instead, to prevent |m_decodedSheetText| from being
reported both as encoded and decoded data to memory-infra.

This CL also makes setParsedStyleSheetCache() to always update the decoded
size, while the decoded size was not updated in some call sites of
setParsedStyleSheetCache().

BUG= 643135 

Review-Url: https://codereview.chromium.org/2477293002
Cr-Commit-Position: refs/heads/master@{#430521}

[modify] https://crrev.com/71b354672add64227227bc3dec0e5462f1e0dda4/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp
[modify] https://crrev.com/71b354672add64227227bc3dec0e5462f1e0dda4/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82c4a08a0b9d5c3edf826c3cd1b16e2318dcc36b

commit 82c4a08a0b9d5c3edf826c3cd1b16e2318dcc36b
Author: hiroshige <hiroshige@chromium.org>
Date: Wed Nov 09 13:24:24 2016

Ensure setEncodedSizeMemoryUsage() is called when |m_data| is cleared

This CL
- Moves setEncodedSizeMemoryUsage(0) calls from the call sites of clearData()
  into the body of clearData(), which doesn't affect the behavior, and
- Replaces |m_data.clear()| in Resource.cpp with clearData(), so that
  the encodedSizeMemoryUsage is updated.

BUG= 643135 

Review-Url: https://codereview.chromium.org/2218013002
Cr-Commit-Position: refs/heads/master@{#430919}

[modify] https://crrev.com/82c4a08a0b9d5c3edf826c3cd1b16e2318dcc36b/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp
[modify] https://crrev.com/82c4a08a0b9d5c3edf826c3cd1b16e2318dcc36b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
[modify] https://crrev.com/82c4a08a0b9d5c3edf826c3cd1b16e2318dcc36b/third_party/WebKit/Source/core/fetch/Resource.cpp
[modify] https://crrev.com/82c4a08a0b9d5c3edf826c3cd1b16e2318dcc36b/third_party/WebKit/Source/core/fetch/Resource.h
[modify] https://crrev.com/82c4a08a0b9d5c3edf826c3cd1b16e2318dcc36b/third_party/WebKit/Source/core/fetch/ScriptResource.cpp

Status: Fixed (was: Started)
Marking as fixed. Feel free to refer to this bug if you find more inconsistencies around encodedSize()/decodedSize().

Sign in to add a comment