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

Issue 327473002: Prepare SVGDocumentExtensions::m_elementDependencies for oilpan (Closed)

Created:
6 years, 6 months ago by kouhei (in TOK)
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-rendering, zoltan1, eae+blinkwatch, leviw+renderwatch, kouhei+svg_chromium.org, fs, ed+blinkwatch_opera.com, krit, f(malita), gyuyoung.kim_webkit.org, jchaffraix+rendering, pdr., rwlbuis, Stephen Chennney, rune+blink
Visibility:
Public.

Description

Prepare SVGDocumentExtensions::m_elementDependencies for oilpan |m_elementDependencies| had raw ptr to |SVGElement|s. This was to avoid reference cycles, but we can convert this to strong references in oilpan. If the whole document is dead, rebuild code is not called. This means that rebuildElementReference is not called for referencing element, but the referencing element must be in the same document and is going to die anyway. If the whole document isn't dead (== the part of the document tree is going away), the unregister/rebuild code is guaranteed to be called from removedFrom, and rebuildElementReference is guaranteed to be triggered from there. BUG=357163, 370834 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175880

Patch Set 1 #

Total comments: 1

Patch Set 2 : add comment about rebuild #

Total comments: 2

Patch Set 3 : Member -> RawPtrWillBeMember #

Patch Set 4 : change to strong refs for clarity #

Patch Set 5 : fix comment #

Total comments: 4

Patch Set 6 : rebased #

Patch Set 7 : No OwnPtr for maps #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -32 lines) Patch
M Source/core/rendering/svg/RenderSVGResource.cpp View 1 2 3 1 chunk +9 lines, -6 lines 0 comments Download
M Source/core/svg/SVGDocumentExtensions.h View 1 2 3 4 5 6 4 chunks +6 lines, -3 lines 0 comments Download
M Source/core/svg/SVGDocumentExtensions.cpp View 1 2 3 4 5 6 5 chunks +19 lines, -19 lines 0 comments Download
M Source/core/svg/SVGElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathElement.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
kouhei (in TOK)
6 years, 6 months ago (2014-06-09 09:06:04 UTC) #1
kouhei (in TOK)
Discussed offline with haraken. We are considering if we can remove the dependency map and ...
6 years, 6 months ago (2014-06-09 09:19:14 UTC) #2
kouhei (in TOK)
https://codereview.chromium.org/327473002/diff/1/Source/core/svg/SVGDocumentExtensions.h File Source/core/svg/SVGDocumentExtensions.h (right): https://codereview.chromium.org/327473002/diff/1/Source/core/svg/SVGDocumentExtensions.h#newcode117 Source/core/svg/SVGDocumentExtensions.h:117: // FIXME: Oilpan: make below HeapHashSet<WeakMember<SVGSVGElement> > I'll move ...
6 years, 6 months ago (2014-06-09 09:21:41 UTC) #3
haraken
https://codereview.chromium.org/327473002/diff/20001/Source/core/rendering/svg/RenderSVGResource.cpp File Source/core/rendering/svg/RenderSVGResource.cpp (right): https://codereview.chromium.org/327473002/diff/20001/Source/core/rendering/svg/RenderSVGResource.cpp#newcode194 Source/core/rendering/svg/RenderSVGResource.cpp:194: typedef WillBeHeapHashSet<Member<SVGElement> > SVGElementSet; This should be WillBeHeapHashSet<RawPtrWillBeMember<SVGElement>>. https://codereview.chromium.org/327473002/diff/20001/Source/core/svg/SVGDocumentExtensions.h ...
6 years, 6 months ago (2014-06-09 09:33:58 UTC) #4
kouhei (in TOK)
On 2014/06/09 09:33:58, haraken wrote: > https://codereview.chromium.org/327473002/diff/20001/Source/core/rendering/svg/RenderSVGResource.cpp > File Source/core/rendering/svg/RenderSVGResource.cpp (right): > > https://codereview.chromium.org/327473002/diff/20001/Source/core/rendering/svg/RenderSVGResource.cpp#newcode194 > ...
6 years, 6 months ago (2014-06-09 10:11:23 UTC) #5
haraken
In terms of oilpan, LGTM. > > This should be WillBeHeapHashSet<RawPtrWillBeMember<SVGElement>>. > Done. > > ...
6 years, 6 months ago (2014-06-09 10:37:02 UTC) #6
kouhei (in TOK)
Changed to strong refs, so the code is more clear. I'd like to land this ...
6 years, 6 months ago (2014-06-10 08:38:36 UTC) #7
haraken
Strong references sound reasonable. https://codereview.chromium.org/327473002/diff/80001/Source/core/svg/SVGDocumentExtensions.h File Source/core/svg/SVGDocumentExtensions.h (right): https://codereview.chromium.org/327473002/diff/80001/Source/core/svg/SVGDocumentExtensions.h#newcode114 Source/core/svg/SVGDocumentExtensions.h:114: OwnPtrWillBeMember<ElementDependenciesMap> m_elementDependencies; I wonder why ...
6 years, 6 months ago (2014-06-10 08:48:19 UTC) #8
kouhei (in TOK)
https://codereview.chromium.org/327473002/diff/80001/Source/core/svg/SVGDocumentExtensions.h File Source/core/svg/SVGDocumentExtensions.h (right): https://codereview.chromium.org/327473002/diff/80001/Source/core/svg/SVGDocumentExtensions.h#newcode114 Source/core/svg/SVGDocumentExtensions.h:114: OwnPtrWillBeMember<ElementDependenciesMap> m_elementDependencies; On 2014/06/10 08:48:19, haraken wrote: > > ...
6 years, 6 months ago (2014-06-10 08:58:59 UTC) #9
haraken
LGTM
6 years, 6 months ago (2014-06-10 09:01:11 UTC) #10
kouhei (in TOK)
The CQ bit was checked by kouhei@chromium.org
6 years, 6 months ago (2014-06-10 09:01:26 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/327473002/120001
6 years, 6 months ago (2014-06-10 09:02:20 UTC) #12
commit-bot: I haz the power
6 years, 6 months ago (2014-06-10 10:05:32 UTC) #13
Message was sent while issue was closed.
Change committed as 175880

Powered by Google App Engine
This is Rietveld 408576698