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

Issue 319593004: Oilpan:Allow custom handling of classes that contain weak pointers that are embedded in collections. (Closed)

Created:
6 years, 6 months ago by Erik Corry
Modified:
6 years, 6 months ago
CC:
blink-reviews, Mads Ager (chromium), abarth-chromium, haraken, blink-reviews-wtf_chromium.org, kouhei+heap_chromium.org, Mikhail
Visibility:
Public.

Description

Allow custom handling of classes that contain weak pointers that are embedded in collections. This is currently tested with HeapHashSet. Extending it to other hash collections is postponed to a later change. To have your type removed from collections when weak pointers in it no longer point to live objects you need to give it two methods and a special hash trait. See WeakHandlingHashTraits in Heap.h for details and PairWithWeakHandling in HeapTest.cpp for an example. R=ager@chromium.org, haraken@chromium.org, wibling@chromium.org, zerny@chromium.org BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176009

Patch Set 1 #

Total comments: 8

Patch Set 2 : Also test HeapLinkedHashSet #

Patch Set 3 : Also test HeapHashMap with custom weakness in key and value positions. #

Patch Set 4 : Feedback from Haraken #

Total comments: 20

Patch Set 5 : Change isWeak in HashTraits to weakHandlingFlag and make it an enum #

Patch Set 6 : HeapTest.cpp changes in response to Mads' feedback #

Patch Set 7 : Remove incorrectly added trace of WeakPtr from Vistior.h #

Patch Set 8 : Merge up #

Patch Set 9 : Remove 'typename' that Win compiler does not like #

Unified diffs Side-by-side diffs Delta from patch set Stats (+521 lines, -228 lines) Patch
M Source/platform/heap/Handle.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -6 lines 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 4 5 6 7 8 chunks +136 lines, -151 lines 0 comments Download
M Source/platform/heap/HeapTest.cpp View 1 2 3 4 5 6 7 8 7 chunks +306 lines, -35 lines 0 comments Download
M Source/platform/heap/Visitor.h View 1 2 3 4 5 6 6 chunks +38 lines, -16 lines 0 comments Download
M Source/wtf/HashTable.h View 1 2 3 4 5 chunks +8 lines, -8 lines 0 comments Download
M Source/wtf/HashTraits.h View 1 2 3 4 2 chunks +10 lines, -2 lines 0 comments Download
M Source/wtf/LinkedHashSet.h View 1 2 3 4 3 chunks +7 lines, -7 lines 0 comments Download
M Source/wtf/ListHashSet.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/wtf/TypeTraits.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M Source/wtf/Vector.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/wtf/VectorTraits.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Erik Corry
PTAL
6 years, 6 months ago (2014-06-05 05:36:51 UTC) #1
haraken
I'm not confident about reviewing this CL, given the complex templates. I'd be happy if ...
6 years, 6 months ago (2014-06-06 08:03:02 UTC) #2
Erik Corry
https://codereview.chromium.org/319593004/diff/1/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/319593004/diff/1/Source/platform/heap/Heap.h#newcode1992 Source/platform/heap/Heap.h:1992: // weak elements. On 2014/06/06 08:03:01, haraken wrote: > ...
6 years, 6 months ago (2014-06-06 08:47:36 UTC) #3
Mads Ager (chromium)
LGTM There will be some plugin cleanup to do after this change. https://codereview.chromium.org/319593004/diff/60001/Source/platform/heap/Handle.h File Source/platform/heap/Handle.h ...
6 years, 6 months ago (2014-06-06 09:59:17 UTC) #4
Erik Corry
https://codereview.chromium.org/319593004/diff/60001/Source/platform/heap/Handle.h File Source/platform/heap/Handle.h (right): https://codereview.chromium.org/319593004/diff/60001/Source/platform/heap/Handle.h#newcode1046 Source/platform/heap/Handle.h:1046: if (strongify == WebCore::WeakPointersActStrong) On 2014/06/06 09:59:16, Mads Ager ...
6 years, 6 months ago (2014-06-06 12:37:21 UTC) #5
Erik Corry
https://codereview.chromium.org/319593004/diff/60001/Source/platform/heap/HeapTest.cpp File Source/platform/heap/HeapTest.cpp (right): https://codereview.chromium.org/319593004/diff/60001/Source/platform/heap/HeapTest.cpp#newcode47 Source/platform/heap/HeapTest.cpp:47: class IntWrapper; On 2014/06/06 09:59:17, Mads Ager (chromium) wrote: ...
6 years, 6 months ago (2014-06-10 11:21:19 UTC) #6
Erik Corry
The CQ bit was checked by erik.corry@gmail.com
6 years, 6 months ago (2014-06-10 11:21:30 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erik.corry@gmail.com/319593004/120001
6 years, 6 months ago (2014-06-10 11:22:35 UTC) #8
Erik Corry
The CQ bit was checked by erik.corry@gmail.com
6 years, 6 months ago (2014-06-10 12:54:44 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erik.corry@gmail.com/319593004/140001
6 years, 6 months ago (2014-06-10 12:56:55 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_compile_dbg on tryserver.blink ...
6 years, 6 months ago (2014-06-10 14:27:06 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 15:57:50 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/11442)
6 years, 6 months ago (2014-06-10 15:57:52 UTC) #13
Erik Corry
The CQ bit was checked by erik.corry@gmail.com
6 years, 6 months ago (2014-06-12 06:03:07 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erik.corry@gmail.com/319593004/160001
6 years, 6 months ago (2014-06-12 06:04:08 UTC) #15
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 6 months ago (2014-06-12 07:17:17 UTC) #16
commit-bot: I haz the power
6 years, 6 months ago (2014-06-12 08:26:10 UTC) #17
Message was sent while issue was closed.
Change committed as 176009

Powered by Google App Engine
This is Rietveld 408576698