⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267583 in webkit


Ignore:
Timestamp:
Sep 25, 2020, 11:20:57 AM (6 years ago)
Author:
Alan Coon
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 <sabouhallawa@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

Location:
branches/safari-610-branch/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-610-branch/LayoutTests/ChangeLog

    r267506 r267583  
     12020-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
    1462020-09-23  Karl Rackler  <rackler@apple.com>
    247
  • branches/safari-610-branch/LayoutTests/svg/animations/smil-leak-element-instances-noBaseValRef.svg

    r265780 r267583  
    3333}
    3434
    35 function startTest() {
     35function runTest() {
    3636    // Collect garbage before recording starting live node count, in case there are live elements from previous tests.
    3737    GCController.collect();
    38     originalLiveElements = window.internals.numberOfLiveNodes();
     38    var originalLiveElements = window.internals.numberOfLiveNodes();
    3939
    40     for (var i = 0; i < 3; i++)
     40    for (var i = 0; i < 1000; i++)
    4141        g.appendChild(createAnimatedRectInstance());
    4242
    43     setTimeout(continueTest, 0);
    44 }
    45 
    46 function continueTest() {
    4743    while (g.hasChildNodes())
    4844        g.removeChild(g.lastChild);
    4945
    50     setTimeout(finishTest, 0);
    51 }
     46    GCController.collect();
     47    var liveDelta = window.internals.numberOfLiveNodes() - originalLiveElements;
    5248
    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)
    6052        log("PASS");
    61     else if (--attemptsToFinish) {
    62         setTimeout(finishTest, 100);
    63         return;
    64     } else
     53    else
    6554        log("FAIL: " + liveDelta + " extra live node(s)");
    6655
     
    7766    }
    7867
    79     setTimeout(startTest, 0);
     68    setTimeout(runTest, 0);
    8069}
    8170]]>
Note: See TracChangeset for help on using the changeset viewer.