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

Issue 1807323002: [WeakMemoryCache 1a] Make Reference from Inspector to Resource weak, remove removedFromMemoryCache() (Closed)

Created:
4 years, 9 months ago by hiroshige
Modified:
4 years, 7 months ago
CC:
chromium-reviews, tyoshino+watch_chromium.org, blink-reviews-style_chromium.org, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, sergeyv+blink_chromium.org, Nate Chapin, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Reference from Inspector to Resource weak, remove removedFromMemoryCache() Previously, Inspector and CSSStyleSheet-related classes depend on whether Resource is in MemoryCache and track Resource's eviction from MemoryCache by removedFromMemoryCache(). This CL replaces the condition of "whether Resource is in MemoryCache" with "whether Resource is not garbage collected": - Replaces Resource::removedFromMemoryCache() with newly-added Resource's prefinalizer, Resource::willDestroyResource(). - Make |NetworkResourcesData::ResourceData::m_cachedResource| a WeakMember, so that Resource's prefinalizer is called even if it is referenced by |m_cachedResource|. - Removes some checks of MemoryCache from Inspector, and replaces StyleSheetContents::isInMemoryCache() with StyleSheetContents::isReferencedFromResource(). This is Step 1a of Weak MemoryCache: https://docs.google.com/document/d/1Pj4vzxzCKC_11SugdJ_x7wq7ErE-pHtf4w4FLKdcF7g/edit?usp=sharing BUG=603462 Committed: https://crrev.com/9b939698486aae30f47b68806ed70d660dea776e Cr-Commit-Position: refs/heads/master@{#392562}

Patch Set 1 #

Patch Set 2 : CSS #

Patch Set 3 : Rebase. #

Patch Set 4 : Fix. #

Patch Set 5 : Fix #

Patch Set 6 : #

Patch Set 7 : Rebase. #

Patch Set 8 : Rebase. #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase. #

Patch Set 11 : Rebase fix. #

Patch Set 12 : Rebase. #

Patch Set 13 : Rebase #

Patch Set 14 : Rebase #

Patch Set 15 : Rebase #

Patch Set 16 : #

Total comments: 7

Patch Set 17 : Rebase and reflect comments. #

Patch Set 18 : auto-Rebase #

Total comments: 4

Patch Set 19 : Remove some comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -55 lines) Patch
M third_party/WebKit/Source/core/css/CSSStyleSheet.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContents.h View 1 2 3 4 5 6 7 8 9 10 11 17 18 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContents.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +15 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCache.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorInstrumentationCustomInl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorResourceAgent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/NetworkResourcesData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 121 (64 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/1
4 years, 9 months ago (2016-03-17 18:46:40 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/20001
4 years, 9 months ago (2016-03-17 18:59:59 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/40001
4 years, 9 months ago (2016-03-17 19:56:50 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/60001
4 years, 9 months ago (2016-03-17 20:11:58 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/140001
4 years, 9 months ago (2016-03-17 22:23:18 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/160001
4 years, 9 months ago (2016-03-17 22:31:50 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/190761)
4 years, 9 months ago (2016-03-18 01:13:55 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/180001
4 years, 9 months ago (2016-03-22 23:25:44 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_oilpan_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_blink_oilpan_rel/builds/20362)
4 years, 9 months ago (2016-03-23 01:02:39 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/200001
4 years, 9 months ago (2016-03-23 18:26:07 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_oilpan_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_blink_oilpan_rel/builds/20743)
4 years, 9 months ago (2016-03-23 19:52:30 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/260001
4 years, 8 months ago (2016-04-14 10:25:49 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/144724)
4 years, 8 months ago (2016-04-14 10:43:24 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/280001
4 years, 8 months ago (2016-04-14 10:51:51 UTC) #35
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-14 12:25:21 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/300001
4 years, 8 months ago (2016-04-15 09:35:28 UTC) #39
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/172692) mac_chromium_compile_dbg_ng on ...
4 years, 8 months ago (2016-04-15 09:53:23 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/340001
4 years, 8 months ago (2016-04-18 06:28:38 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-18 07:49:07 UTC) #45
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/380001
4 years, 7 months ago (2016-04-26 07:44:15 UTC) #48
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/56732)
4 years, 7 months ago (2016-04-26 08:05:33 UTC) #50
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/380001
4 years, 7 months ago (2016-04-26 09:13:57 UTC) #53
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-26 10:21:15 UTC) #55
hiroshige
PTAL.
4 years, 7 months ago (2016-04-26 11:17:25 UTC) #57
Nate Chapin
lgtm https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp (right): https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp#newcode569 third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp:569: // and removed in removedResourceFromMemoryCache(), so if the ...
4 years, 7 months ago (2016-04-26 17:32:20 UTC) #58
dgozman
core/inspector lgtm, but I cannot say anything about all the css changes. I think it ...
4 years, 7 months ago (2016-04-26 23:58:50 UTC) #59
yhirano
lgtm https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/css/StyleSheetContents.h File third_party/WebKit/Source/core/css/StyleSheetContents.h (right): https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/css/StyleSheetContents.h#newcode144 third_party/WebKit/Source/core/css/StyleSheetContents.h:144: bool isReferencedFromResource() const { return m_isReferencedFromResource; } It ...
4 years, 7 months ago (2016-04-27 11:00:06 UTC) #60
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/400001
4 years, 7 months ago (2016-04-28 08:06:30 UTC) #62
hiroshige
https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/css/StyleSheetContents.h File third_party/WebKit/Source/core/css/StyleSheetContents.h (right): https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/css/StyleSheetContents.h#newcode144 third_party/WebKit/Source/core/css/StyleSheetContents.h:144: bool isReferencedFromResource() const { return m_isReferencedFromResource; } On 2016/04/27 ...
4 years, 7 months ago (2016-04-28 08:06:34 UTC) #63
hiroshige
+tasak@, could you take another look on core/css?
4 years, 7 months ago (2016-04-28 08:13:54 UTC) #65
tasak
lgtm
4 years, 7 months ago (2016-04-28 08:19:42 UTC) #66
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-28 09:11:56 UTC) #68
dgozman
https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode247 third_party/WebKit/Source/core/fetch/Resource.cpp:247: InspectorInstrumentation::willDestroyResource(this); On 2016/04/28 08:06:33, hiroshige wrote: > On 2016/04/26 ...
4 years, 7 months ago (2016-04-28 15:17:26 UTC) #69
haraken
On 2016/04/28 15:17:26, dgozman wrote: > https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/fetch/Resource.cpp > File third_party/WebKit/Source/core/fetch/Resource.cpp (right): > > https://codereview.chromium.org/1807323002/diff/380001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode247 > ...
4 years, 7 months ago (2016-04-29 07:04:46 UTC) #70
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/400001
4 years, 7 months ago (2016-05-02 09:22:17 UTC) #72
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/168490) ios_rel_device_ninja on ...
4 years, 7 months ago (2016-05-02 09:24:20 UTC) #74
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/420001
4 years, 7 months ago (2016-05-02 09:28:06 UTC) #76
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-02 11:50:05 UTC) #78
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/420001
4 years, 7 months ago (2016-05-06 07:56:54 UTC) #80
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-simulator on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/1610) ios-simulator-gn on ...
4 years, 7 months ago (2016-05-06 07:58:52 UTC) #82
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/460001
4 years, 7 months ago (2016-05-06 09:08:38 UTC) #84
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/480001
4 years, 7 months ago (2016-05-06 09:11:08 UTC) #86
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-06 11:12:31 UTC) #88
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/480001
4 years, 7 months ago (2016-05-09 00:04:05 UTC) #90
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/500001
4 years, 7 months ago (2016-05-09 00:38:27 UTC) #92
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/225279)
4 years, 7 months ago (2016-05-09 01:30:04 UTC) #94
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/500001
4 years, 7 months ago (2016-05-09 03:28:00 UTC) #96
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/224021)
4 years, 7 months ago (2016-05-09 04:29:55 UTC) #98
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/500001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/500001
4 years, 7 months ago (2016-05-09 05:26:10 UTC) #100
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/224070)
4 years, 7 months ago (2016-05-09 06:26:56 UTC) #106
hiroshige
rune@, Could you take a look at changes under core/css and core/fetch/CSSStyleSheetResource.h/cpp? I rebased after ...
4 years, 7 months ago (2016-05-09 06:28:28 UTC) #108
rune
Code lgtm, but you may just remove the comments, I think. https://codereview.chromium.org/1807323002/diff/500001/third_party/WebKit/Source/core/css/StyleSheetContents.h File third_party/WebKit/Source/core/css/StyleSheetContents.h (right): ...
4 years, 7 months ago (2016-05-09 07:32:47 UTC) #109
hiroshige
https://codereview.chromium.org/1807323002/diff/500001/third_party/WebKit/Source/core/css/StyleSheetContents.h File third_party/WebKit/Source/core/css/StyleSheetContents.h (right): https://codereview.chromium.org/1807323002/diff/500001/third_party/WebKit/Source/core/css/StyleSheetContents.h#newcode144 third_party/WebKit/Source/core/css/StyleSheetContents.h:144: // A StyleSheetContents must not be shared by multiple ...
4 years, 7 months ago (2016-05-10 06:32:55 UTC) #110
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/520001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/520001
4 years, 7 months ago (2016-05-10 06:33:22 UTC) #112
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1807323002/520001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1807323002/520001
4 years, 7 months ago (2016-05-10 06:48:47 UTC) #116
commit-bot: I haz the power
Committed patchset #19 (id:520001)
4 years, 7 months ago (2016-05-10 07:38:06 UTC) #118
commit-bot: I haz the power
4 years, 7 months ago (2016-05-10 07:39:20 UTC) #120
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/9b939698486aae30f47b68806ed70d660dea776e
Cr-Commit-Position: refs/heads/master@{#392562}

Powered by Google App Engine
This is Rietveld 408576698