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

Issue 304453002: Prepare SMILTimeContainer for oilpan (Closed)

Created:
6 years, 7 months ago by kouhei (in TOK)
Modified:
6 years, 6 months ago
CC:
blink-reviews, Eric Willigers, Steve Block, krit, rjwright, Mike Lawther (Google), blink-reviews-animation_chromium.org, fs, Timothy Loh, dstockwell, ed+blinkwatch_opera.com, shans, f(malita), gyuyoung.kim_webkit.org, darktears, Stephen Chennney, kouhei+svg_chromium.org, rwlbuis
Visibility:
Public.

Description

Prepare SMILTimeContainer for oilpan This prepares |SMILTimeContainer::m_scheduledAnimations| for oilpan. - Vector<SVGSMILElement*> is changed to LinkedHashSet, as oilpan do not support having weak members as vector element. - Entries pointing to disposing elements are automatically rewritten by oilpan weak processing. They are explicitly removed at |updateAnimations()| BUG=357163 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174933

Patch Set 1 #

Total comments: 12

Patch Set 2 : address comments (but HeapTest.cpp) #

Patch Set 3 : change containers and evict invalid keys manually #

Total comments: 18

Patch Set 4 : address comments #

Total comments: 5

Patch Set 5 : fix_compile #

Patch Set 6 : fix_compile2 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -29 lines) Patch
M Source/core/svg/SVGElementRareData.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/svg/SVGSVGElement.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGSVGElement.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/svg/animation/SMILTimeContainer.h View 1 2 3 4 chunks +9 lines, -6 lines 0 comments Download
M Source/core/svg/animation/SMILTimeContainer.cpp View 1 2 3 4 5 6 chunks +39 lines, -19 lines 1 comment Download
M Source/core/svg/animation/SVGSMILElement.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/animation/SVGSMILElement.cpp View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
kouhei (in TOK)
6 years, 7 months ago (2014-05-26 07:41:52 UTC) #1
haraken
https://codereview.chromium.org/304453002/diff/1/Source/core/svg/SVGElementRareData.h File Source/core/svg/SVGElementRareData.h (right): https://codereview.chromium.org/304453002/diff/1/Source/core/svg/SVGElementRareData.h#newcode154 Source/core/svg/SVGElementRareData.h:154: RawPtrWillBeWeakMember<SVGElement> m_owner; This can be a WeakMember since it's ...
6 years, 7 months ago (2014-05-26 08:27:26 UTC) #2
haraken
https://codereview.chromium.org/304453002/diff/1/Source/core/svg/SVGElementRareData.h File Source/core/svg/SVGElementRareData.h (right): https://codereview.chromium.org/304453002/diff/1/Source/core/svg/SVGElementRareData.h#newcode159 Source/core/svg/SVGElementRareData.h:159: RawPtrWillBeMember<SVGElement> m_correspondingElement; On 2014/05/26 08:27:27, haraken wrote: > > ...
6 years, 7 months ago (2014-05-26 08:43:28 UTC) #3
kouhei (in TOK)
https://codereview.chromium.org/304453002/diff/1/Source/core/svg/SVGElementRareData.h File Source/core/svg/SVGElementRareData.h (right): https://codereview.chromium.org/304453002/diff/1/Source/core/svg/SVGElementRareData.h#newcode154 Source/core/svg/SVGElementRareData.h:154: RawPtrWillBeWeakMember<SVGElement> m_owner; On 2014/05/26 08:27:27, haraken wrote: > > ...
6 years, 7 months ago (2014-05-26 08:55:28 UTC) #4
kouhei (in TOK)
https://codereview.chromium.org/304453002/diff/1/Source/core/svg/animation/SMILTimeContainer.h File Source/core/svg/animation/SMILTimeContainer.h (right): https://codereview.chromium.org/304453002/diff/1/Source/core/svg/animation/SMILTimeContainer.h#newcode114 Source/core/svg/animation/SMILTimeContainer.h:114: typedef pair<RawPtrWillBeWeakMember<SVGElement>, QualifiedName> ElementAttributePair; On 2014/05/26 08:55:28, kouhei wrote: ...
6 years, 7 months ago (2014-05-26 09:12:48 UTC) #5
haraken
https://codereview.chromium.org/304453002/diff/1/Source/core/svg/animation/SMILTimeContainer.h File Source/core/svg/animation/SMILTimeContainer.h (right): https://codereview.chromium.org/304453002/diff/1/Source/core/svg/animation/SMILTimeContainer.h#newcode114 Source/core/svg/animation/SMILTimeContainer.h:114: typedef pair<RawPtrWillBeWeakMember<SVGElement>, QualifiedName> ElementAttributePair; On 2014/05/26 09:12:48, kouhei wrote: ...
6 years, 7 months ago (2014-05-26 09:17:56 UTC) #6
Erik Corry
There's not support for this right now. If updateAnimations is called frequently enough (is it ...
6 years, 7 months ago (2014-05-26 14:19:25 UTC) #7
kouhei (in TOK)
PTAL. On 2014/05/26 14:19:25, Erik Corry wrote: > There's not support for this right now. ...
6 years, 7 months ago (2014-05-27 07:51:45 UTC) #8
haraken
https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (right): https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp#newcode119 Source/core/svg/animation/SMILTimeContainer.cpp:119: m_scheduledAnimations.remove(it); Just help me understand: Having this remove() looks ...
6 years, 7 months ago (2014-05-27 08:25:55 UTC) #9
Erik Corry
https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (right): https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp#newcode387 Source/core/svg/animation/SMILTimeContainer.cpp:387: invalidKeys.add(it->key); Should there not also be "continue;" here?
6 years, 7 months ago (2014-05-27 08:28:06 UTC) #10
Erik Corry
https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (right): https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp#newcode386 Source/core/svg/animation/SMILTimeContainer.cpp:386: if (!it->key.first || !it->value || it->value->isEmpty()) On 2014/05/27 08:25:56, ...
6 years, 7 months ago (2014-05-27 08:41:46 UTC) #11
kouhei (in TOK)
https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (right): https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp#newcode119 Source/core/svg/animation/SMILTimeContainer.cpp:119: m_scheduledAnimations.remove(it); On 2014/05/27 08:25:56, haraken wrote: > > Just ...
6 years, 7 months ago (2014-05-27 08:50:51 UTC) #12
Erik Corry
lgtm https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (right): https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp#newcode242 Source/core/svg/animation/SMILTimeContainer.cpp:242: for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it != end; ...
6 years, 7 months ago (2014-05-27 08:55:22 UTC) #13
haraken
+pdr
6 years, 7 months ago (2014-05-27 23:40:43 UTC) #14
kouhei (in TOK)
PTAL. https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (right): https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SMILTimeContainer.cpp#newcode242 Source/core/svg/animation/SMILTimeContainer.cpp:242: for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it != end; ...
6 years, 7 months ago (2014-05-28 01:00:50 UTC) #15
haraken
LGTM. Please explain non-trivial changes in the CL description. https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SVGSMILElement.cpp File Source/core/svg/animation/SVGSMILElement.cpp (right): https://codereview.chromium.org/304453002/diff/40001/Source/core/svg/animation/SVGSMILElement.cpp#newcode210 Source/core/svg/animation/SVGSMILElement.cpp:210: ...
6 years, 7 months ago (2014-05-28 01:43:55 UTC) #16
kouhei (in TOK)
https://codereview.chromium.org/304453002/diff/50001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (right): https://codereview.chromium.org/304453002/diff/50001/Source/core/svg/animation/SMILTimeContainer.cpp#newcode391 Source/core/svg/animation/SMILTimeContainer.cpp:391: invalidKeys.add(it->key); On 2014/05/28 01:43:56, haraken wrote: > > Ditto. ...
6 years, 7 months ago (2014-05-28 01:50:14 UTC) #17
pdr.
LGTM with a question. https://codereview.chromium.org/304453002/diff/50001/Source/core/svg/animation/SMILTimeContainer.h File Source/core/svg/animation/SMILTimeContainer.h (right): https://codereview.chromium.org/304453002/diff/50001/Source/core/svg/animation/SMILTimeContainer.h#newcode115 Source/core/svg/animation/SMILTimeContainer.h:115: typedef WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<SVGSMILElement> > AnimationsLinkedHashSet; Is ...
6 years, 7 months ago (2014-05-28 01:56:34 UTC) #18
kouhei (in TOK)
On 2014/05/28 01:56:34, pdr wrote: > LGTM with a question. > > https://codereview.chromium.org/304453002/diff/50001/Source/core/svg/animation/SMILTimeContainer.h > File ...
6 years, 7 months ago (2014-05-28 02:04:15 UTC) #19
pdr.
On 2014/05/28 02:04:15, kouhei wrote: > On 2014/05/28 01:56:34, pdr wrote: > > LGTM with ...
6 years, 7 months ago (2014-05-28 02:11:37 UTC) #20
kouhei (in TOK)
On 2014/05/28 02:11:37, pdr wrote: > On 2014/05/28 02:04:15, kouhei wrote: > > On 2014/05/28 ...
6 years, 7 months ago (2014-05-28 02:27:58 UTC) #21
kouhei (in TOK)
The CQ bit was checked by kouhei@chromium.org
6 years, 7 months ago (2014-05-28 02:28:07 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/304453002/70001
6 years, 7 months ago (2014-05-28 02:28:47 UTC) #23
kouhei (in TOK)
The CQ bit was checked by kouhei@chromium.org
6 years, 6 months ago (2014-05-28 02:57:34 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/304453002/80001
6 years, 6 months ago (2014-05-28 02:57:50 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 6 months ago (2014-05-28 04:25:09 UTC) #26
commit-bot: I haz the power
Change committed as 174933
6 years, 6 months ago (2014-05-28 05:39:50 UTC) #27
Erik Corry
On 2014/05/28 02:11:37, pdr wrote: > On 2014/05/28 02:04:15, kouhei wrote: > > On 2014/05/28 ...
6 years, 6 months ago (2014-05-28 08:09:54 UTC) #28
Erik Corry
https://codereview.chromium.org/304453002/diff/50001/Source/core/svg/animation/SMILTimeContainer.cpp File Source/core/svg/animation/SMILTimeContainer.cpp (left): https://codereview.chromium.org/304453002/diff/50001/Source/core/svg/animation/SMILTimeContainer.cpp#oldcode114 Source/core/svg/animation/SMILTimeContainer.cpp:114: scheduled->remove(idx); This was a remove from a vector, which ...
6 years, 6 months ago (2014-05-28 08:10:05 UTC) #29
Erik Corry
6 years, 6 months ago (2014-05-28 14:00:08 UTC) #30
Message was sent while issue was closed.
https://codereview.chromium.org/304453002/diff/80001/Source/core/svg/animatio...
File Source/core/svg/animation/SMILTimeContainer.cpp (right):

https://codereview.chromium.org/304453002/diff/80001/Source/core/svg/animatio...
Source/core/svg/animation/SMILTimeContainer.cpp:432:
m_scheduledAnimations.removeAll(invalidKeys);
I just realized that this will never remove anything.  The remove(item) calls
all do nothing because an item with a nulled key.first has a different hash code
from the one it had when it was inserted.  Therefore the lookup fails and
nothing is removed.

That probably leads to leaks.

I'm working on fixing handling of pairs with weakness so that this is not an
issue.

Powered by Google App Engine
This is Rietveld 408576698