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

Issue 219753004: Oilpan: Build fix after r170454 (Closed)

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

Description

Oilpan: Build fix after r170454 r170454 was almost Oilpan-ready, add missing bits. R=mvanouwerkerk@chromium.org BUG= NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170475

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -4 lines) Patch
M Source/modules/push_messaging/NavigatorPushManager.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/push_messaging/PushManager.h View 2 chunks +8 lines, -2 lines 2 comments Download
M Source/modules/push_messaging/PushManager.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
sof
Please take a look.
6 years, 8 months ago (2014-03-31 18:35:40 UTC) #1
Michael van Ouwerkerk
On 2014/03/31 18:35:40, sof wrote: > Please take a look. My apologies. lgtm
6 years, 8 months ago (2014-03-31 18:53:43 UTC) #2
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 8 months ago (2014-03-31 19:01:24 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/219753004/1
6 years, 8 months ago (2014-03-31 19:01:28 UTC) #4
commit-bot: I haz the power
Change committed as 170475
6 years, 8 months ago (2014-03-31 19:01:44 UTC) #5
Peter Beverloo
Thanks for the follow-up, Sigbjorn! Sorry for missing this in the review. https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messaging/PushManager.h File Source/modules/push_messaging/PushManager.h ...
6 years, 8 months ago (2014-03-31 19:08:07 UTC) #6
sof
On 2014/03/31 18:53:43, Michael van Ouwerkerk wrote: > On 2014/03/31 18:35:40, sof wrote: > > ...
6 years, 8 months ago (2014-03-31 19:08:56 UTC) #7
sof
https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messaging/PushManager.h File Source/modules/push_messaging/PushManager.h (right): https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messaging/PushManager.h#newcode18 Source/modules/push_messaging/PushManager.h:18: class PushManager FINAL : public RefCountedWillBeGarbageCollectedFinalized<PushManager>, public ScriptWrappable { ...
6 years, 8 months ago (2014-03-31 19:32:39 UTC) #8
sof
On 2014/03/31 19:32:39, sof wrote: > https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messaging/PushManager.h > File Source/modules/push_messaging/PushManager.h (right): > > https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messaging/PushManager.h#newcode18 > ...
6 years, 8 months ago (2014-03-31 20:33:44 UTC) #9
haraken
LGTM, thanks for the quick fix.
6 years, 8 months ago (2014-03-31 23:04:33 UTC) #10
zerny-chromium
On 2014/03/31 20:33:44, sof wrote: > On 2014/03/31 19:32:39, sof wrote: > > > https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messaging/PushManager.h ...
6 years, 8 months ago (2014-04-01 08:55:49 UTC) #11
sof
6 years, 8 months ago (2014-04-01 11:46:26 UTC) #12
Message was sent while issue was closed.
On 2014/04/01 08:55:49, zerny-chromium wrote:
> On 2014/03/31 20:33:44, sof wrote:
> > On 2014/03/31 19:32:39, sof wrote:
> > >
> >
>
https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messagin...
> > > File Source/modules/push_messaging/PushManager.h (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/219753004/diff/1/Source/modules/push_messagin...
> > > Source/modules/push_messaging/PushManager.h:18: class PushManager FINAL :
> > public
> > > RefCountedWillBeGarbageCollectedFinalized<PushManager>, public
> ScriptWrappable
> > {
> > > On 2014/03/31 19:08:07, Peter Beverloo wrote:
> > > > Could you confirm my understanding of this change?
> > > > 
> > > > Very similar classes, e.g. Notification and BatteryManager, are
> > > > RefCountedWillBeRefCountedGarbageCollected, but they have to be given
that
> > > > events can be fired on them, and they thus have to be kept alive.  This
is
> > not
> > > > the case for PushManager, which is not an EventTarget, and can therefore
> be
> > > GCed
> > > > the moment a call to navigator.push.register() (or other future methods)
> is
> > > > done. Therefore the reference counting is not needed, and we can rely on
> > just
> > > > GC.
> > > 
> > > Yes, an event target will have to be kept alive for as long as there are
> > > listeners attached (which aren't heap allocated, so a ref count is
> separately
> > > kept.)
> > > 
> > > As you say, there are no heap-external PushManager references, so
> > > *RefCountedGarbageCollected is not needed for it,
*GarbageCollectedFinalized
> > > suffices. If it sprouts events later, we can add it then.
> > > 
> > > Do notice that the Navigator supplementable will trace&keep
> > NavigatorPushManager
> > > (a supplement of it) alive. Which again will keep PushManager alive. So,
the
> > > push manager&supplement will stay around for as long as the Navigator
object
> > > does.
> > 
> > It doesn't do harm per se, but it might be worth thinking about GC clang
> plugin
> > support for detecting unnecessary uses of RefCountedGarbageCollected &
> reporting
> > those as warnings.
> 
> I don't think we can add compile-time checks for this as the need for ref
> counting is not always locally determined. It is possible to have eliminated
all
> uses of RefPtr to a type but some part of the hierarchy might have a mixin
(eg,
> EventTarget or ActiveDOMObject) which still requires ref/deref.
> 

Yes, it's not a local property. But I wonder how many false positives there
would be for a simple check (!= RefCountedGarbageCollected) for classes that
derive from ScriptWrappable only. i.e., catching the case here of adapting
a class declaration that also derived from EventTarget.

Just a thought.

> I've added some stats collecting to the process-graph.py plugin script which
can
> makes post-compilation checks of the graph. Running it will allow us to
identify
> cases where the ref counting can be removed. (Current ToT has no such cases)

That's quite awesome.

Powered by Google App Engine
This is Rietveld 408576698