Re: Where are instances of PerformanceNavigationTiming created?

On Thu, 2014-07-10 at 12:19 -0400, Boris Zbarsky wrote:
> > I read that part and I interpreted as the "primary buffer for
> > PerformanceResourceTiming resources"
> 
> Sure.  My point is that nothing actually clearly defines which objects 
> getEntries and company will return.  It seems to be assumed in the spec 
> that for resource timing entries only the ones in the primary buffer 
> will be returned, but nothing actually _says_ that.

ok. That should be made explicit as part of the step on creation.

I'm wondering how far we need to go along that path however. For
example, we never indicated when the initial window.performance object
gets created. So far, it's assumed to be there as soon as a script can
be executed, ie by dom loading, like several objects available from
window.

> > It's possible to maintain the PerformanceNavigationTiming object around.
> 
> It's possible to do all sorts of things.  The question is what behavior 
> this spec requires, if any.  And the answer is that as far as I can tell 
> I can implement whatever the heck I want for getEntries and it will not 
> obviously violate the spec.
> 
> I mean, I can obviously reverse engineer other UAs and implement what 
> they did.  Hence https://twitter.com/bz_moz/status/487049670024523776
> 
> > The processing model notes:
> > [[
> > Some user agents maintain the DOM structure of the document in memory
> 
> I'm not talking about this case.  I'm talking about the case when the 
> old document is discarded.

It seems to me that we need to define this in performance timeline. In
others words, each specification (like Navigation or Resource Timing)
should define when the objects get created and added to the entries
list, but Performance Timeline should define when the entries get
discarded by default (Performance.clearResourceTimings() would then
complement that behavior). In that case, we would need to add the
following to Performance Timeline: 
[[
A part of the steps defined in "unload a document" [See Unloading
documents, HTML], if both the Document's salvageable state and recycle
are false, the Document's browsing context must discard all instances of
PerformanceEntry objects after discarding the Document and getEntries()
must return an empty PerformanceEntryList.
]]

Philippe

Received on Thursday, 10 July 2014 18:36:49 UTC