Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[SVG] Detach list wrappers before resetting the base value.
https://bugs.webkit.org/show_bug.cgi?id=180912 <rdar://problem/36017970> Reviewed by Simon Fraser. Source/WebCore: Before resetting the animation value (and destroying the assigned SVG object -SVGLengthValue in this case), we need to check if there's an associated tear off wrapper for the said SVG object and make a copy of it. This is currently done in the wrong order through animValDidChange. Test: svg/animations/crash-when-animation-is-running-while-getting-value.html * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue): * svg/properties/SVGAnimatedPropertyTearOff.h: * svg/properties/SVGAnimatedStaticPropertyTearOff.h: (WebCore::SVGAnimatedStaticPropertyTearOff::synchronizeWrappersIfNeeded): LayoutTests: * svg/animations/crash-when-animation-is-running-while-getting-value-expected.txt: Added. * svg/animations/crash-when-animation-is-running-while-getting-value.html: Added. Canonical link: https://commits.webkit.org/196826@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
2162e5a
commit 4751067
Showing
7 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
LayoutTests/svg/animations/crash-when-animation-is-running-while-getting-value-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PASS if no crash. | ||
|
16 changes: 16 additions & 0 deletions
16
LayoutTests/svg/animations/crash-when-animation-is-running-while-getting-value.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
PASS if no crash. | ||
<svg> | ||
<text x="1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" id="textElement"> | ||
<set attributeName="x" to="0"/> | ||
</svg> | ||
<script> | ||
if (window.testRunner) { | ||
testRunner.dumpAsText(); | ||
testRunner.waitUntilDone(); | ||
} | ||
setTimeout(function() { | ||
textElement.x.animVal.getItem(0); | ||
if (window.testRunner) | ||
testRunner.notifyDone(); | ||
}, 0); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters