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

Issue 558213002: Simplify DOMWindowProperty and its unregistration. (Closed)

Created:
6 years, 3 months ago by sof
Modified:
6 years, 3 months ago
CC:
blink-reviews
Project:
blink
Visibility:
Public.

Description

Simplify DOMWindowProperty and its unregistration. As LocalDOMWindow controls the registration lifetime of its DOMWindowProperties, there's no need to offer a separate unregistration mechanism. Remove it, simplify notification code + retire now unused LocalDOMWindow back reference on DOMWindowProperty. R=haraken,ager BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181758

Patch Set 1 #

Patch Set 2 : Iterate instead #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -53 lines) Patch
M Source/core/frame/DOMWindowProperty.h View 2 chunks +2 lines, -7 lines 0 comments Download
M Source/core/frame/DOMWindowProperty.cpp View 2 chunks +7 lines, -28 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.h View 1 chunk +0 lines, -1 line 3 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 2 chunks +4 lines, -17 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
sof
Please take a look. Not oilpan(-reviews) specific, but DOMWindowProperty lifetime details are fresh in their ...
6 years, 3 months ago (2014-09-10 15:22:44 UTC) #2
haraken
LGTM, this is a nice clean-up!
6 years, 3 months ago (2014-09-10 15:41:58 UTC) #3
Mads Ager (chromium)
https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalDOMWindow.h File Source/core/frame/LocalDOMWindow.h (right): https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalDOMWindow.h#newcode368 Source/core/frame/LocalDOMWindow.h:368: WillBeHeapHashSet<RawPtrWillBeMember<DOMWindowProperty> > m_properties; What makes sure that a DOMWindowProperty ...
6 years, 3 months ago (2014-09-10 15:52:56 UTC) #5
Mads Ager (chromium)
LGTM! https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalDOMWindow.h File Source/core/frame/LocalDOMWindow.h (right): https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalDOMWindow.h#newcode368 Source/core/frame/LocalDOMWindow.h:368: WillBeHeapHashSet<RawPtrWillBeMember<DOMWindowProperty> > m_properties; On 2014/09/10 15:52:56, Mads Ager ...
6 years, 3 months ago (2014-09-10 15:55:19 UTC) #6
sof
https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalDOMWindow.h File Source/core/frame/LocalDOMWindow.h (right): https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalDOMWindow.h#newcode368 Source/core/frame/LocalDOMWindow.h:368: WillBeHeapHashSet<RawPtrWillBeMember<DOMWindowProperty> > m_properties; On 2014/09/10 15:55:19, Mads Ager (chromium) ...
6 years, 3 months ago (2014-09-10 18:18:39 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/558213002/20001
6 years, 3 months ago (2014-09-10 18:19:07 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 181758
6 years, 3 months ago (2014-09-10 19:22:42 UTC) #10
sof
On 2014/09/10 15:55:19, Mads Ager (chromium) wrote: > LGTM! > > https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalDOMWindow.h > File Source/core/frame/LocalDOMWindow.h ...
6 years, 3 months ago (2014-09-12 08:21:07 UTC) #11
Mads Ager (chromium)
6 years, 3 months ago (2014-09-12 08:47:17 UTC) #12
Message was sent while issue was closed.
On 2014/09/12 08:21:07, sof wrote:
> On 2014/09/10 15:55:19, Mads Ager (chromium) wrote:
> > LGTM!
> > 
> >
>
https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalD...
> > File Source/core/frame/LocalDOMWindow.h (right):
> > 
> >
>
https://codereview.chromium.org/558213002/diff/20001/Source/core/frame/LocalD...
> > Source/core/frame/LocalDOMWindow.h:368:
> > WillBeHeapHashSet<RawPtrWillBeMember<DOMWindowProperty> > m_properties;
> > On 2014/09/10 15:52:56, Mads Ager (chromium) wrote:
> > > What makes sure that a DOMWindowProperty cannot die before the
> LocalDOMWindow
> > > and therefore the notification that the global object is being destroyed?
> > > 
> > > It makes sense for the DOMWindowProperties that are LocalDOMWindow
> > supplements.
> > > However, there are other DOMWIndowProperties such as BarProp that are not
> > > LocalDOMWindow supplements and I can't convince myself that they cannot
die
> > > before the LocalDOMWindow in the non-oilpan build?
> > > 
> > > (That also reopens the question that we had on the oilpan part of this
code.
> I
> > > said that I would prefer a strong relationship between the
DOMWindowProperty
> > and
> > > its LocalDOMWindow. However, if there are short lived DOMWindowProperties,
> we
> > > might not want to have the LocalDOMWindow keep them alive. If that is the
> case
> > > we should move to weak processing in the oilpan build to remove from this
> > set.)
> > 
> > Heh, ignore me. All of those properties are held alive by the list of
RefPtrs
> > below. :-)
> 
> Bad idea not take that concern fully aboard :) DOMSelection objects live & die
> independently of any LocalDOMWindow, so they will need to  be able to
> detach/unregister as a DOMWindowProperty when being finalized. Other
> DOMWindowProperty-derived objects appear kept alive via LocalDOMWindow.
> 
> So this optimization isn't valid in general _and_ I think we do need to move
to
> having LocalDOMWindow::m_properties be a weak set. (The use of strong
references
> hid this DOMSelection-involved bug with Oilpan enabled.)

Yeah, that makes sense. Sorry for not being more pushy on this. I checked a
handful that looked safe; I should have checked them all. Let's make it a weak
set for oilpan.

Powered by Google App Engine
This is Rietveld 408576698