<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - resourcetimingbufferfull fired prematurely"
   href="https://bugs.webkit.org/show_bug.cgi?id=193004">193004</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>resourcetimingbufferfull fired prematurely
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Safari 12
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebCore Misc.
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cvazac@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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 "fire a buffer full event" steps. Then the developer calls `setResourceTimingBufferSize()` to make more room. When the "fire a buffer full event" steps do run, "can add resource timing entry" will return true (which means we don't fire `resourcetimingbufferfull`). At that point, both entries of the secondary buffer fit into the primary buffer.

[0] <a href="https://wpt.fyi/results/resource-timing/buffer-full-then-increased.html?label=experimental">https://wpt.fyi/results/resource-timing/buffer-full-then-increased.html?label=experimental</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>