Changeset 267583 in webkit
- Timestamp:
- Sep 25, 2020, 11:20:57 AM (6 years ago)
- Location:
- branches/safari-610-branch/LayoutTests
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
svg/animations/smil-leak-element-instances-noBaseValRef.svg (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610-branch/LayoutTests/ChangeLog
r267506 r267583 1 2020-09-22 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r266765. rdar://problem/69382910 4 5 [ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure 6 https://bugs.webkit.org/show_bug.cgi?id=215353 7 8 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-09-08 9 Reviewed by Geoffrey Garen. 10 11 This patch reverts r265780 and goes in the opposite direction: allocating 12 lots and lots of objects, then proving that the number of live objects 13 did not grow a lot. 14 15 GCController can be conservative sometimes and leaves some objects here 16 and there. So we should not be checking that *all* the objects were freed 17 to verify there was no leak in allocating the SVG properties objects. 18 19 Instead we can check for an end-to-end test the memory did not grow a lot 20 despite the huge number of allocations. 21 22 * svg/animations/smil-leak-element-instances-noBaseValRef.svg: 23 24 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266765 268f45cc-cd09-0410-ab3c-d52691b4dbfc 25 26 2020-09-08 Said Abou-Hallawa <sabouhallawa@apple.com> 27 28 [ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure 29 https://bugs.webkit.org/show_bug.cgi?id=215353 30 31 Reviewed by Geoffrey Garen. 32 33 This patch reverts r265780 and goes in the opposite direction: allocating 34 lots and lots of objects, then proving that the number of live objects 35 did not grow a lot. 36 37 GCController can be conservative sometimes and leaves some objects here 38 and there. So we should not be checking that *all* the objects were freed 39 to verify there was no leak in allocating the SVG properties objects. 40 41 Instead we can check for an end-to-end test the memory did not grow a lot 42 despite the huge number of allocations. 43 44 * svg/animations/smil-leak-element-instances-noBaseValRef.svg: 45 1 46 2020-09-23 Karl Rackler <rackler@apple.com> 2 47 -
branches/safari-610-branch/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg
r265780 r267583 33 33 } 34 34 35 function startTest() {35 function runTest() { 36 36 // Collect garbage before recording starting live node count, in case there are live elements from previous tests. 37 37 GCController.collect(); 38 originalLiveElements = window.internals.numberOfLiveNodes();38 var originalLiveElements = window.internals.numberOfLiveNodes(); 39 39 40 for (var i = 0; i < 3; i++)40 for (var i = 0; i < 1000; i++) 41 41 g.appendChild(createAnimatedRectInstance()); 42 42 43 setTimeout(continueTest, 0);44 }45 46 function continueTest() {47 43 while (g.hasChildNodes()) 48 44 g.removeChild(g.lastChild); 49 45 50 setTimeout(finishTest, 0);51 } 46 GCController.collect(); 47 var liveDelta = window.internals.numberOfLiveNodes() - originalLiveElements; 52 48 53 var attemptsToFinish = 5; 54 55 function finishTest() { 56 GCController.collect(); 57 58 var liveDelta = window.internals.numberOfLiveNodes() - originalLiveElements; 59 if (liveDelta == 0) 49 // The goal of this test is to verify allocating lots and lots of objects will not 50 // grow the allocated memory a lot once they are removed. 51 if (liveDelta <= 5) 60 52 log("PASS"); 61 else if (--attemptsToFinish) { 62 setTimeout(finishTest, 100); 63 return; 64 } else 53 else 65 54 log("FAIL: " + liveDelta + " extra live node(s)"); 66 55 … … 77 66 } 78 67 79 setTimeout( startTest, 0);68 setTimeout(runTest, 0); 80 69 } 81 70 ]]>
Note:
See TracChangeset
for help on using the changeset viewer.