Title: [266765] trunk/LayoutTests
Revision
266765
Author
[email protected]
Date
2020-09-08 17:52:53 -0700 (Tue, 08 Sep 2020)

Log Message

[ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215353

Patch by Said Abou-Hallawa <[email protected]> on 2020-09-08
Reviewed by Geoffrey Garen.

This patch reverts r265780 and goes in the opposite direction: allocating
lots and lots of objects, then proving that the number of live objects
did not grow a lot.

GCController can be conservative sometimes and leaves some objects here
and there. So we should not be checking that *all* the objects were freed
to verify there was no leak in allocating the SVG properties objects.

Instead we can check for an end-to-end test the memory did not grow a lot
despite the huge number of allocations.

* svg/animations/smil-leak-element-instances-noBaseValRef.svg:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (266764 => 266765)


--- trunk/LayoutTests/ChangeLog	2020-09-09 00:41:29 UTC (rev 266764)
+++ trunk/LayoutTests/ChangeLog	2020-09-09 00:52:53 UTC (rev 266765)
@@ -1,3 +1,23 @@
+2020-09-08  Said Abou-Hallawa  <[email protected]>
+
+        [ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=215353
+
+        Reviewed by Geoffrey Garen.
+
+        This patch reverts r265780 and goes in the opposite direction: allocating
+        lots and lots of objects, then proving that the number of live objects
+        did not grow a lot.
+
+        GCController can be conservative sometimes and leaves some objects here
+        and there. So we should not be checking that *all* the objects were freed
+        to verify there was no leak in allocating the SVG properties objects.
+
+        Instead we can check for an end-to-end test the memory did not grow a lot
+        despite the huge number of allocations.
+
+        * svg/animations/smil-leak-element-instances-noBaseValRef.svg:
+
 2020-09-08  Hector Lopez  <[email protected]>
 
         [ macOS iOS ] imported/w3c/web-platform-tests/IndexedDB/blob-valid-after-deletion.any.html is a flaky failure

Modified: trunk/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg (266764 => 266765)


--- trunk/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg	2020-09-09 00:41:29 UTC (rev 266764)
+++ trunk/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg	2020-09-09 00:52:53 UTC (rev 266765)
@@ -32,36 +32,25 @@
     return use;
 }
 
-function startTest() {
+function runTest() {
     // Collect garbage before recording starting live node count, in case there are live elements from previous tests.
     GCController.collect();
-    originalLiveElements = window.internals.numberOfLiveNodes();
+    var originalLiveElements = window.internals.numberOfLiveNodes();
 
-    for (var i = 0; i < 3; i++)
+    for (var i = 0; i < 1000; i++)
         g.appendChild(createAnimatedRectInstance());
 
-    setTimeout(continueTest, 0);
-}
-
-function continueTest() {
     while (g.hasChildNodes())
         g.removeChild(g.lastChild);
 
-    setTimeout(finishTest, 0);
-}
-
-var attemptsToFinish = 5;
-
-function finishTest() {
     GCController.collect();
+    var liveDelta = window.internals.numberOfLiveNodes() - originalLiveElements;
 
-    var liveDelta = window.internals.numberOfLiveNodes() - originalLiveElements;
-    if (liveDelta == 0)
+    // The goal of this test is to verify allocating lots and lots of objects will not
+    // grow the allocated memory a lot once they are removed.
+    if (liveDelta <= 5)
         log("PASS");
-    else if (--attemptsToFinish) {
-        setTimeout(finishTest, 100);
-        return;
-    } else
+    else
         log("FAIL: " + liveDelta + " extra live node(s)");
 
     testRunner.notifyDone();
@@ -76,7 +65,7 @@
         return;
     }
 
-    setTimeout(startTest, 0);
+    setTimeout(runTest, 0);
 }
 ]]>
 </script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to