Bug 193004 - resourcetimingbufferfull fired inadvertently after buffer size increase
Summary: resourcetimingbufferfull fired inadvertently after buffer size increase
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-21 20:16 PST by cvazac
Modified: 2018-12-23 17:36 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cvazac 2018-12-21 20:16:42 PST
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] https://wpt.fyi/results/resource-timing/buffer-full-then-increased.html?label=experimental