Skip to content

Commit

Permalink
Expose a mechanism for hiding internal timing info
Browse files Browse the repository at this point in the history
This is needed for whatwg/html#7104
and later on for whatwg#1215.

Navigation timing reports the timing info from the HTML spec,
so it needs a mechanism to obfuscate the internals. So far that
obfuscation was internal to fetch and was done upon reporting.
  • Loading branch information
noamr committed Sep 23, 2021
1 parent b2f04e2 commit cb872fb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ following <a for=struct>items</a>: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]
<dd>Null or a <a for=/>connection timing info</a>.
</dl>

<p>To <dfn export lt="create an opaque timing info|creating an opaque timing info">create an
opaque timing info</dfn>, given a <a for=/>fetch timing info</a> <var>timingInfo</var>,
create a new <a for=/>fetch timing info</a> whose <a for="fetch timing info">start time</a> and
<a for="fetch timing info">post-redirect start time</a> are <var>timingInfo</var>'s
<a for="fetch timing info">start time</a>.

<p>To <dfn>update timing info from stored response</dfn>, given a
<a for=/>connection timing info</a> <var>timingInfo</var> and a <a for=/>response</a>
<var>response</var>, perform the following steps:
Expand Down Expand Up @@ -4131,10 +4137,8 @@ steps:
<p>If <var>response</var>'s <a for=response>timing allow passed flag</a> is not set, then:

<ol>
<li><p>Set <var>timingInfo</var> to a new <a for=/>fetch timing info</a> whose
<a for="fetch timing info">start time</a> and
<a for="fetch timing info">post-redirect start time</a> are <var>timingInfo</var>'s
<a for="fetch timing info">start time</a>.
<li><p>Set <var>timingInfo</var> to a the result of <a>creating an opaque timing info</a> for
<var>timingInfo</var>.

<li><p>Set <var>cacheState</var> to the empty string.
</ol>
Expand Down

0 comments on commit cb872fb

Please sign in to comment.