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

Issue 374593002: Support ignorance of base class finalizers. (Closed)

Created:
6 years, 5 months ago by sof
Modified:
6 years, 5 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Support ignorance of base class finalizers. When checking if a class needs a finalizer, allow some of its base classes to be ignored, even if they do have a declared destructor. This is done so as to handle WebCore::ScriptWrappable use better while in transition. i.e., WebCore::ScriptWrappable's destructor does not have to be invoked when sweeping, and when Oilpan will be on by default, ScriptWrappable will not define one. However, until that time, it still provides a user-defined destructor, and to allow the class to be used as base in conjunction with GarbageCollected<>, we will now look past it when checking the finalizer requirement. R=zerny@chromium.org BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281758

Patch Set 1 #

Total comments: 2

Patch Set 2 : Reworked, static check now expressed by RecordInfo::NeedsFinalization() #

Total comments: 13

Patch Set 3 : Use early returns instead of fallthrough #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -17 lines) Patch
M tools/clang/blink_gc_plugin/Config.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/RecordInfo.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/RecordInfo.cpp View 1 2 2 chunks +41 lines, -1 line 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_base.h View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_base.cpp View 1 1 chunk +11 lines, -0 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_base.txt View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_field.h View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_field.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_mixin.h View 1 2 4 chunks +23 lines, -3 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_mixin.cpp View 1 2 chunks +14 lines, -3 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/class_requires_finalization_mixin.txt View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M tools/clang/blink_gc_plugin/tests/heap/stubs.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
sof
Please take a look.
6 years, 5 months ago (2014-07-07 08:33:33 UTC) #1
zerny-chromium
Thanks for having a look at this. It would be great to have support for ...
6 years, 5 months ago (2014-07-07 09:04:33 UTC) #2
sof
On 2014/07/07 09:04:33, zerny-chromium wrote: > Thanks for having a look at this. It would ...
6 years, 5 months ago (2014-07-07 09:11:52 UTC) #3
sof
Thanks for the feedback, shallowly performing the check when reporting the state of the finalization-needing ...
6 years, 5 months ago (2014-07-07 18:49:22 UTC) #4
zerny-chromium
This recursive check will do the trick. Looks mostly good with a few comments. https://codereview.chromium.org/374593002/diff/20001/tools/clang/blink_gc_plugin/RecordInfo.cpp ...
6 years, 5 months ago (2014-07-08 07:45:03 UTC) #5
sof
https://codereview.chromium.org/374593002/diff/20001/tools/clang/blink_gc_plugin/RecordInfo.cpp File tools/clang/blink_gc_plugin/RecordInfo.cpp (right): https://codereview.chromium.org/374593002/diff/20001/tools/clang/blink_gc_plugin/RecordInfo.cpp#newcode412 tools/clang/blink_gc_plugin/RecordInfo.cpp:412: if (does_need_finalization_) { On 2014/07/08 07:45:03, zerny-chromium wrote: > ...
6 years, 5 months ago (2014-07-08 08:47:06 UTC) #6
sof
https://codereview.chromium.org/374593002/diff/20001/tools/clang/blink_gc_plugin/RecordInfo.cpp File tools/clang/blink_gc_plugin/RecordInfo.cpp (right): https://codereview.chromium.org/374593002/diff/20001/tools/clang/blink_gc_plugin/RecordInfo.cpp#newcode434 tools/clang/blink_gc_plugin/RecordInfo.cpp:434: if (ns && On 2014/07/08 08:47:05, sof wrote: > ...
6 years, 5 months ago (2014-07-08 08:48:49 UTC) #7
zerny-chromium
lgtm
6 years, 5 months ago (2014-07-08 11:09:38 UTC) #8
sof
Thanks for the review (and the code for this static analysis pass, easy to work ...
6 years, 5 months ago (2014-07-08 11:21:36 UTC) #9
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-08 11:21:47 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/374593002/40001
6 years, 5 months ago (2014-07-08 11:25:00 UTC) #11
commit-bot: I haz the power
Change committed as 281758
6 years, 5 months ago (2014-07-08 15:33:41 UTC) #12
Nico
(sof: In case you aren't aware: The plugin is bundled with the clang binaries, so ...
6 years, 5 months ago (2014-07-08 15:41:56 UTC) #13
sof
On 2014/07/08 15:41:56, Nico (away) wrote: > (sof: In case you aren't aware: The plugin ...
6 years, 5 months ago (2014-07-08 15:46:28 UTC) #14
sof
On 2014/07/08 15:46:28, sof wrote: > On 2014/07/08 15:41:56, Nico (away) wrote: > > (sof: ...
6 years, 5 months ago (2014-07-18 12:58:34 UTC) #15
Nico
On 2014/07/18 12:58:34, sof wrote: > On 2014/07/08 15:46:28, sof wrote: > > On 2014/07/08 ...
6 years, 5 months ago (2014-07-18 15:57:45 UTC) #16
sof
6 years, 5 months ago (2014-07-19 06:23:47 UTC) #17
Message was sent while issue was closed.
On 2014/07/18 15:57:45, Nico (away) wrote:
> On 2014/07/18 12:58:34, sof wrote:
> > On 2014/07/08 15:46:28, sof wrote:
> > > On 2014/07/08 15:41:56, Nico (away) wrote:
> > > > (sof: In case you aren't aware: The plugin is bundled with the clang
> > binaries,
> > > > so this change won't have an effect until we build new binaries. This
> isn't
> > > hard
> > > > to do, but if you have more changes planned it might make sense to
rebuild
> > > them
> > > > after they're all done (assuming they're all relatively small). If this
is
> > > your
> > > > only change, let us know if it's urgent; else it'll be part of the
> "regular"
> > > > clang refresh eventually.)
> > > 
> > > thanks, nothing urgent about this. No other CLs planned.
> > 
> > The rename from WebCore to blink necessitated an update to blink_gc_plugin
and
> a
> > new clang roll, it seems --
> > 
> >  http://commondatastorage.googleapis.com/chromium-browser-clang/index.html
> 
> That's independent of the blink rename; we just roll clang every now and then
> (we're shooting for every 1-2 weeks normally; there was a longer break this
time
> due to vacations and http://crbug.com/381910)
> 
> > Do we have to wait for that to deploy on the bots? (The CL that depends on
it
> > fails still, https://codereview.chromium.org/367113005/ )
> 
> commondatastorage is where bots downloads their compilers from, but just
> uploading a binary there doesn't make it active –&nbsp;we need to change the
clang
> download script to download the new version.
> https://codereview.chromium.org/397243003/ is the change that does that, but
due
> to its tryjobs not even starting it hasn't landed yet. (There are a few red
> bots, but the whitespace cl linked from
> https://code.google.com/p/chromium/issues/detail?id=381489#c10 has them too.)

Thanks much for explaining; will check in on the status of that CL & roll.

Powered by Google App Engine
This is Rietveld 408576698