[Resource Timing] Contradiction in onresourcetimingbufferfull behavior

It's not clear what to do when setResourceTimingBufferSize() is called with
a smaller value during the onresourcetimingbufferfull callback.

The third paragraph under setResourceTimingBufferSize() [1] says:

"if the maxSize parameter is less than the number of elements currently
stored in the buffer, no elements in the buffer are to be removed."

The second bullet under onresourcetimingbufferfull [2] says:

"setResourceTimingBufferSize is called - The PerformanceEntryList will
extend and / or truncate to the buffer size specified."

So the first says to truncate and the second says not to. The processing
model doesn't mention truncation.

I don't have a strong preference which way we go. It seems like an odd
thing for a user to do, but if they willfully make it smaller in response
to the callback, it seems we ought to honor that and truncate the items.

OTOH, it's simpler to just ignore it. If we decide to truncate, we have to
define that too.

James

P.S. The first line I quoted should be capitalized in the spec.

P.P.S. The second quote infers it's possible to extend _and_ truncate. That
seems pretty weird.

[1]
http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html#dom-performance-setresourcetimingbuffersize

[2]
http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html#dom-performance-onresourcetimingbufferfull

Received on Thursday, 12 July 2012 00:10:49 UTC