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

Issue 1968683003: Simplify SVGSMILElement::notifyDependentsIntervalChanged loop breaker. (Closed)

Created:
4 years, 7 months ago by sof
Modified:
4 years, 7 months ago
Reviewers:
oilpan-reviews, haraken
CC:
chromium-reviews, Eric Willigers, krit, rjwright, blink-reviews-animation_chromium.org, kouhei+svg_chromium.org, fs, shans, f(malita), darktears, blink-reviews, gyuyoung2, Stephen Chennney, pdr+svgwatchlist_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify SVGSMILElement::notifyDependentsIntervalChanged loop breaker. To catch out recursive notifications, notifyDependentsIntervalChanged() keeps track of the SVGSMILElements that are on the stack and being notified, so as to bail early in case of loops. There's no need for that set of SVGSMILElements to be recorded using a persistent static local as the objects are stack reachable should a conservative GC be needed, so an 'ordinary' hash set will do. Not using a persistent reference also addresses a bad interaction with LSan (Blink has to release all static persistents before shutting down to prevent false leaks w/ LSan enabled), but SVGImages containing animations may end up in this code path as part of an image resource being finalized. Which would then encounter an empty persistent static reference and fail (see associated bug and stack trace.) R=haraken BUG=610855 Committed: https://crrev.com/6d735f78334721b46d37f97ad8efb12d6e329e75 Cr-Commit-Position: refs/heads/master@{#392919}

Patch Set 1 #

Total comments: 2

Patch Set 2 : add explanatory comment re UntracedMember<> #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp View 1 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
sof
please take a look.
4 years, 7 months ago (2016-05-11 11:35:51 UTC) #2
sof
Using PersistentHeapHashSet<> is an alternative that would also work (for obscure reasons), but I don't ...
4 years, 7 months ago (2016-05-11 11:36:59 UTC) #3
haraken
LGTM https://codereview.chromium.org/1968683003/diff/1/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp File third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp (right): https://codereview.chromium.org/1968683003/diff/1/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp#newcode1225 third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp:1225: DEFINE_STATIC_LOCAL(HashSet<UntracedMember<SVGSMILElement>>, loopBreaker, ()); Maybe worth adding a comment ...
4 years, 7 months ago (2016-05-11 11:53:23 UTC) #5
sof
https://codereview.chromium.org/1968683003/diff/1/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp File third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp (right): https://codereview.chromium.org/1968683003/diff/1/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp#newcode1225 third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp:1225: DEFINE_STATIC_LOCAL(HashSet<UntracedMember<SVGSMILElement>>, loopBreaker, ()); On 2016/05/11 11:53:23, haraken wrote: > ...
4 years, 7 months ago (2016-05-11 12:11:20 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1968683003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1968683003/20001
4 years, 7 months ago (2016-05-11 12:11:45 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-11 14:39:42 UTC) #12
commit-bot: I haz the power
4 years, 7 months ago (2016-05-11 14:41:28 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/6d735f78334721b46d37f97ad8efb12d6e329e75
Cr-Commit-Position: refs/heads/master@{#392919}

Powered by Google App Engine
This is Rietveld 408576698