Title: [267583] branches/safari-610-branch/LayoutTests
Revision
267583
Author
alanc...@apple.com
Date
2020-09-25 11:20:57 -0700 (Fri, 25 Sep 2020)

Log Message

Cherry-pick r266765. rdar://problem/69382910

    [ 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 <sabouhall...@apple.com> 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:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266765 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610-branch/LayoutTests/ChangeLog (267582 => 267583)


--- branches/safari-610-branch/LayoutTests/ChangeLog	2020-09-25 18:20:55 UTC (rev 267582)
+++ branches/safari-610-branch/LayoutTests/ChangeLog	2020-09-25 18:20:57 UTC (rev 267583)
@@ -1,3 +1,48 @@
+2020-09-22  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r266765. rdar://problem/69382910
+
+    [ 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 <sabouhall...@apple.com> 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:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-09-08  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+            [ 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-23  Karl Rackler  <rack...@apple.com>
 
         [iOS] Update fast/text/opticalFontWithTextStyle.html for iOS 14

Modified: branches/safari-610-branch/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg (267582 => 267583)


--- branches/safari-610-branch/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg	2020-09-25 18:20:55 UTC (rev 267582)
+++ branches/safari-610-branch/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg	2020-09-25 18:20:57 UTC (rev 267583)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to