<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>187764</bug_id>
          
          <creation_ts>2018-07-18 09:45:56 -0700</creation_ts>
          <short_desc>Memory leak when using requestAnimationFrame</short_desc>
          <delta_ts>2018-07-26 08:25:21 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Safari Technology Preview</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 10</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Plamen">plamend</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1443029</commentid>
    <comment_count>0</comment_count>
      <attachid>345254</attachid>
    <who name="Plamen">plamend</who>
    <bug_when>2018-07-18 09:45:56 -0700</bug_when>
    <thetext>Created attachment 345254
a minimal example of a leaking issue

It seems that if I have a lambda function which only assigned a value to a global variable
and pass those lambda function to requestAnimationFrame the heap size growing all the time.
The growing of the heap depends on the size of the value that I want to assign. 

I am using &quot;safari-technology-preview-34&quot;

also If I pass an empty lambda function to &quot;requestAnimationFrame&quot; the &quot;WeakSet::addAllocator&quot; add a new block every time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1444017</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-07-20 21:22:48 -0700</bug_when>
    <thetext>Safari Tech Preview is now at version 61. Does this still reproduce?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445334</commentid>
    <comment_count>2</comment_count>
    <who name="Plamen">plamend</who>
    <bug_when>2018-07-26 00:11:10 -0700</bug_when>
    <thetext>unfortunately, it is no  trivial for me to switch to STP 61</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1445421</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-07-26 08:25:21 -0700</bug_when>
    <thetext>Using the web inspector&apos;s heap snapshot with your test case, I can&apos;t see any memory growth with your test case in STP 61.

How are you measuring heap growth?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>345254</attachid>
            <date>2018-07-18 09:45:56 -0700</date>
            <delta_ts>2018-07-18 09:45:56 -0700</delta_ts>
            <desc>a minimal example of a leaking issue</desc>
            <filename>leak.html</filename>
            <type>text/html</type>
            <size>580</size>
            <attacher name="Plamen">plamend</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHNjcmlwdD4KICAgICAgbGV0IGRh
dGFIYW5kbGU7CgogICAgICBjb25zdCB1cGRhdGUgPSAoKSA9PiB7CiAgICAgICAgZGF0YUhhbmRs
ZSA9CiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiX2lkIjogIjViMzUwYWM3MTA0ZTVmZjA1
Yzg4NjAwZCIsCiAgICAgICAgICAgICAgImd1aWQiOiAiNTE3MWYxZjUtYmM2YS00Nzg2LTgxNDkt
NjBlYWJkMTY2NzUxIiwKICAgICAgICAgICAgICAiYmFsYW5jZSI6ICIkMSw4MTEuMDgiLAogICAg
ICAgICAgICAgICJwaWN0dXJlIjogImh0dHA6Ly9wbGFjZWhvbGQuaXQvMzJ4MzIiLAogICAgICAg
ICAgICAgICJncmVldGluZyI6ICJIZWxsbywgLi4uLi4uLi4uLiEgWW91IGhhdmUgNCB1bnJlYWQg
bWVzc2FnZXMuIiwKICAgICAgICAgICAgICAiZmF2b3JpdGVGcnVpdCI6ICJiYW5hbmEiCiAgICAg
ICAgICAgIH07CiAgICAgICAgcmVxdWVzdEFuaW1hdGlvbkZyYW1lKHVwZGF0ZSk7CiAgICAgIH07
CiAgICAgIHVwZGF0ZSgpOwogICAgPC9zY3JpcHQ+CiAgPC9oZWFkPgogIDxib2R5PgogIDwvYm9k
eT4KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>