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

Issue 2253853002: Remove SharedBuffer::unlock() and keep Resource's SharedBuffer always locked (Closed)

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

Description

Remove SharedBuffer::unlock() and keep Resource's SharedBuffer always locked This CL makes Resource's SharedBuffer always locked and never unlocked by removing SharedBuffer::unlock(), and propagates the change by removing the following: - Resource::lock(), unlock() (does nothing and returns always true) - Resource::isPurgeable() (always false) - Resource::isSafeToUnlock() (no longer called) - SharedBuffer::lock(), unlock(), isLocked() (always true) - PurgeableVector::lock(), unlock(), isLocked() (always true) - Unit tests related to SharedBuffer/PurgeableVector::lock()/unlock() from PurgeableVectorTest and ResourceTest. After this CL, the SharedBuffer is still allocated as discardable memory. The SharedBuffer will be turned into non-discardable by https://codereview.chromium.org/2247073007/. BUG=603791, 569162 Committed: https://crrev.com/18d61e56cf1b2c1deaa0dec1a4cda1f1fd825f57 Cr-Commit-Position: refs/heads/master@{#414005}

Patch Set 1 #

Patch Set 2 : Remove NoCrash test, because weno longer lock Resource #

Patch Set 3 : Propagate changes #

Patch Set 4 : Fix #

Patch Set 5 : Comments #

Patch Set 6 : Rebase #

Total comments: 5

Patch Set 7 : Fix #

Patch Set 8 : Remove Resource::unlock() #

Patch Set 9 : Remove Resource::isSafeToUnlock() #

Total comments: 2

Patch Set 10 : Use hasClientsOrObservers() for live_size #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -327 lines) Patch
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCache.cpp View 1 2 3 4 5 6 3 chunks +2 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 7 8 9 6 chunks +2 lines, -61 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceTest.cpp View 1 2 chunks +0 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ScriptResource.cpp View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp View 1 2 3 4 5 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVector.h View 1 2 3 4 4 chunks +3 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVector.cpp View 1 2 5 chunks +0 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVectorTest.cpp View 1 2 2 chunks +0 lines, -84 lines 0 comments Download
M third_party/WebKit/Source/platform/SharedBuffer.h View 1 2 3 1 chunk +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/SharedBuffer.cpp View 1 2 3 chunks +0 lines, -18 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
hiroshige
PTAL.
4 years, 4 months ago (2016-08-17 07:53:58 UTC) #4
haraken
https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp File third_party/WebKit/Source/core/fetch/MemoryCache.cpp (left): https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp#oldcode593 third_party/WebKit/Source/core/fetch/MemoryCache.cpp:593: purgeableSize += purgeable ? pageSize : 0; Can you ...
4 years, 4 months ago (2016-08-17 08:13:31 UTC) #6
hiroshige
https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp File third_party/WebKit/Source/core/fetch/MemoryCache.cpp (left): https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp#oldcode593 third_party/WebKit/Source/core/fetch/MemoryCache.cpp:593: purgeableSize += purgeable ? pageSize : 0; On 2016/08/17 ...
4 years, 4 months ago (2016-08-17 09:02:38 UTC) #7
haraken
https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode562 third_party/WebKit/Source/core/fetch/Resource.cpp:562: memoryCache()->remove(this); On 2016/08/17 09:02:38, hiroshige wrote: > On 2016/08/17 ...
4 years, 4 months ago (2016-08-17 09:10:26 UTC) #8
hiroshige
On 2016/08/17 09:10:26, haraken wrote: > https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp > File third_party/WebKit/Source/core/fetch/Resource.cpp (right): > > https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode562 > ...
4 years, 4 months ago (2016-08-18 05:28:44 UTC) #9
haraken
On 2016/08/18 05:28:44, hiroshige wrote: > On 2016/08/17 09:10:26, haraken wrote: > > > https://codereview.chromium.org/2253853002/diff/100001/third_party/WebKit/Source/core/fetch/Resource.cpp ...
4 years, 4 months ago (2016-08-18 06:22:51 UTC) #11
yhirano
https://codereview.chromium.org/2253853002/diff/160001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2253853002/diff/160001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode822 third_party/WebKit/Source/core/fetch/Resource.cpp:822: dump->addScalar("live_size", "bytes", m_encodedSize); Do these live/dead concepts make sense ...
4 years, 4 months ago (2016-08-18 09:28:28 UTC) #12
hiroshige
On 2016/08/18 06:22:51, haraken wrote: > On 2016/08/18 05:28:44, hiroshige wrote: > > On 2016/08/17 ...
4 years, 4 months ago (2016-08-19 04:56:23 UTC) #13
hiroshige
https://codereview.chromium.org/2253853002/diff/160001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2253853002/diff/160001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode822 third_party/WebKit/Source/core/fetch/Resource.cpp:822: dump->addScalar("live_size", "bytes", m_encodedSize); On 2016/08/18 09:28:27, yhirano wrote: > ...
4 years, 4 months ago (2016-08-19 05:37:43 UTC) #14
haraken
On 2016/08/19 04:56:23, hiroshige wrote: > On 2016/08/18 06:22:51, haraken wrote: > > On 2016/08/18 ...
4 years, 4 months ago (2016-08-19 06:34:03 UTC) #15
haraken
LGTM on my side.
4 years, 4 months ago (2016-08-19 06:36:43 UTC) #16
Mike West
LGTM 2, FWIW.
4 years, 4 months ago (2016-08-19 09:19:15 UTC) #17
yhirano
lgtm
4 years, 4 months ago (2016-08-23 04:59:05 UTC) #18
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/2253853002/180001
4 years, 4 months ago (2016-08-24 07:06:00 UTC) #24
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 4 months ago (2016-08-24 07:11:06 UTC) #26
commit-bot: I haz the power
4 years, 4 months ago (2016-08-24 07:12:42 UTC) #28
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/18d61e56cf1b2c1deaa0dec1a4cda1f1fd825f57
Cr-Commit-Position: refs/heads/master@{#414005}

Powered by Google App Engine
This is Rietveld 408576698