Changeset 266765 in webkit
- Timestamp:
- Sep 8, 2020, 5:52:53 PM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
svg/animations/smil-leak-element-instances-noBaseValRef.svg (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r266764 r266765 1 2020-09-08 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 [ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=215353 5 6 Reviewed by Geoffrey Garen. 7 8 This patch reverts r265780 and goes in the opposite direction: allocating 9 lots and lots of objects, then proving that the number of live objects 10 did not grow a lot. 11 12 GCController can be conservative sometimes and leaves some objects here 13 and there. So we should not be checking that *all* the objects were freed 14 to verify there was no leak in allocating the SVG properties objects. 15 16 Instead we can check for an end-to-end test the memory did not grow a lot 17 despite the huge number of allocations. 18 19 * svg/animations/smil-leak-element-instances-noBaseValRef.svg: 20 1 21 2020-09-08 Hector Lopez <hector_i_lopez@apple.com> 2 22 -
trunk/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg
r265780 r266765 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.