<?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>193004</bug_id>
          
          <creation_ts>2018-12-21 20:16:42 -0800</creation_ts>
          <short_desc>resourcetimingbufferfull fired inadvertently after buffer size increase</short_desc>
          <delta_ts>2018-12-23 17:36:29 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>Safari 12</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>cvazac</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>yoav</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1490604</commentid>
    <comment_count>0</comment_count>
    <who name="">cvazac</who>
    <bug_when>2018-12-21 20:16:42 -0800</bug_when>
    <thetext>A web-platform-test test [0] overflows the buffer, but then immediately increases the size of the buffer to make room for the new entries. In that case, a `resourcetimingbufferfull` event should never actually fire. 

In the test, resources/empty.js?xhr2 and resources/empty.js?xhr3 overflow the buffer. Which queues a task (async) to run the &quot;fire a buffer full event&quot; steps. Then the developer calls `setResourceTimingBufferSize()` to make more room. When the &quot;fire a buffer full event&quot; steps do run, &quot;can add resource timing entry&quot; will return true (which means we don&apos;t fire `resourcetimingbufferfull`). At that point, both entries of the secondary buffer fit into the primary buffer.

[0] https://wpt.fyi/results/resource-timing/buffer-full-then-increased.html?label=experimental</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>