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

Issue 1150863003: Oilpan: rename EAGERLY_SWEEP() as EAGERLY_FINALIZED(). (Closed)

Created:
5 years, 7 months ago by sof
Modified:
5 years, 7 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: rename EAGERLY_SWEEP() as EAGERLY_FINALIZED(). Renamed to make its purpose clearer; classes are to be annotated as eagerly finalized when they either need to promptly release ownership of non-heap objects, or when their destructors have an unavoidable need to access other heap objects. Both kinds are considered very rare, but more accurate control of finalization timing is sometimes needed & vital. Also introduce a transition time version of the macro, EAGERLY_FINALIZED_WILL_BE_REMOVED() for the places where eager finalization is needed non-Oilpan once lazy sweeping is enabled. That class annotation will be removed once the class is always on the heap. R=haraken BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195887

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -20 lines) Patch
M Source/core/frame/DOMWindowProperty.h View 1 chunk +1 line, -3 lines 0 comments Download
M Source/platform/LifecycleObserver.h View 1 chunk +1 line, -3 lines 0 comments Download
M Source/platform/heap/Heap.h View 3 chunks +12 lines, -11 lines 1 comment Download
M Source/platform/heap/HeapTest.cpp View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
sof
please take a look.
5 years, 7 months ago (2015-05-25 20:57:56 UTC) #2
haraken
LGTM
5 years, 7 months ago (2015-05-25 23:24:16 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1150863003/1
5 years, 7 months ago (2015-05-26 05:15:28 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=195887
5 years, 7 months ago (2015-05-26 05:18:42 UTC) #6
sof
I went back & forth on whether to use EAGERLY_FINALIZE() or EAGERLY_FINALIZED() as a class-level ...
5 years, 7 months ago (2015-05-26 06:35:23 UTC) #7
haraken
https://codereview.chromium.org/1150863003/diff/1/Source/platform/heap/Heap.h File Source/platform/heap/Heap.h (right): https://codereview.chromium.org/1150863003/diff/1/Source/platform/heap/Heap.h#newcode1145 Source/platform/heap/Heap.h:1145: class HeapIndexTrait<T, typename WTF::EnableIf<IsEagerlyFinalizedType<T>::value>::Type> { Just to confirm: class ...
5 years, 7 months ago (2015-05-26 13:06:35 UTC) #9
sof
On 2015/05/26 13:06:35, haraken wrote: > https://codereview.chromium.org/1150863003/diff/1/Source/platform/heap/Heap.h > File Source/platform/heap/Heap.h (right): > > https://codereview.chromium.org/1150863003/diff/1/Source/platform/heap/Heap.h#newcode1145 > ...
5 years, 7 months ago (2015-05-26 13:08:42 UTC) #10
haraken
On 2015/05/26 13:08:42, sof wrote: > On 2015/05/26 13:06:35, haraken wrote: > > https://codereview.chromium.org/1150863003/diff/1/Source/platform/heap/Heap.h > ...
5 years, 7 months ago (2015-05-26 13:13:19 UTC) #11
sof
5 years, 7 months ago (2015-05-26 13:19:26 UTC) #12
Message was sent while issue was closed.
On 2015/05/26 13:13:19, haraken wrote:
> On 2015/05/26 13:08:42, sof wrote:
> > On 2015/05/26 13:06:35, haraken wrote:
> > >
> https://codereview.chromium.org/1150863003/diff/1/Source/platform/heap/Heap.h
> > > File Source/platform/heap/Heap.h (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/1150863003/diff/1/Source/platform/heap/Heap.h...
> > > Source/platform/heap/Heap.h:1145: class HeapIndexTrait<T, typename
> > > WTF::EnableIf<IsEagerlyFinalizedType<T>::value>::Type> {
> > > 
> > > Just to confirm:
> > > 
> > > class A : GarbageCollected<A> {
> > >   EAGERLY_FINALIZE();
> > >   static A* create() {
> > >     return new A; // This will be created in the eagerly sweep heap.
> > >   }
> > > };
> > > 
> > > class B : class A {
> > >   static B* create() {
> > >     return new B;  // Will this be created in the eagerly sweep heap?
> > >   }
> > > };
> > > 
> > > My question is whether the SFINAE returns true for sub-classes.
> > 
> > Doesn't the HeapTest unit test answer your question?
> 
> Yes, sorry about the noise :)

There are some complexities when faced with Node & EventTarget though atm,
doesn't work for those.
https://codereview.chromium.org/1157933002/ tries to address, but I'm not
entirely happy with it. (== I haven't published the CL yet :) )

Powered by Google App Engine
This is Rietveld 408576698