[Webkit-unassigned] [Bug 190440] WebKit Inspector: Expose Server Timing Response Headers in Network Tab
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 12 16:52:30 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=190440
--- Comment #30 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 352214
--> https://bugs.webkit.org/attachment.cgi?id=352214
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=352214&action=review
>>> Source/WebInspectorUI/UserInterface/Models/ServerTimingEntry.js:180
>>> + if (!this._durationSet) {
>>
>> Is it necessary to prevent modification of this value once it's set? Typically, our style would be to `console.assert` for this, as it's more of a programmer's responsibility to control this.
>
> Per spec (https://w3c.github.io/server-timing/) "first-man" in wins, relevant bits:
> To avoid any possible ambiguity, individual server-timing-param-names SHOULD NOT appear multiple times within a server-timing-metric. If any server-timing-param-name is specified more than once, only the first instance is to be considered, even if the server-timing-param is incomplete or invalid. All subsequent occurrences MUST be ignored without signaling an error or otherwise altering the processing of the server-timing-metric. This is the only case in which the ordering of parameters within a server-timing-metric is considered to be significant.
In that case, use an early return:
set duration(duration)
{
if (this._duration !== undefined)
return;
this._duration = duration;
}
You might also want to synthesize a console error to warn developers that "hey you included the same name twice".
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181012/f247f982/attachment.html>
More information about the webkit-unassigned
mailing list