Expose Performance.toJSON() in workers

RESOLVED FIXED in Firefox 65

Status

()

P2
normal
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: baku, Assigned: baku)

Tracking

({dev-doc-complete})

Trunk
mozilla65
dev-doc-complete
Points:
---

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Comment 1

5 months ago
Attachment #9022866 - Flags: review?(bugs)
Priority: -- → P2
Comment on attachment 9022866 [details] [diff] [review]
performance.patch

Plenty of small issues. Please fix them all.



>  * The origin of this IDL file is
>- * http://w3c.github.io/hr-time/
>+ * https://w3c.github.io/hr-time/#sec-performance
>+ * https://www.w3.org/TR/navigation-timing/#dom-window-performance
>+ * https://www.w3.org/TR/performance-timeline/#extensions-to-the-performance-interface
>+ * https://www.w3.org/TR/resource-timing/#extensions-performance-interface
>+ * https://www.w3.org/TR/user-timing/#extensions-performance-interface

Please don't add links to obsolete TR/ specs. We don't want people to look at them basically ever.
performance attribute is in https://w3c.github.io/hr-time/#the-performance-attribute
performance.json in https://w3c.github.io/hr-time/#sec-performance
etc.

> 
>-// http://www.w3.org/TR/resource-timing/#extensions-performance-interface
>+// https://www.w3.org/TR/resource-timing/#extensions-performance-interface
No TR please.
https://w3c.github.io/resource-timing/#sec-extensions-performance-interface


> 
>-// http://www.w3.org/TR/user-timing/
>+// https://www.w3.org/TR/user-timing/#extensions-performance-interface
no TR please
https://w3c.github.io/user-timing/#extensions-performance-interface

>  * The origin of this IDL file is
>- * http://www.w3.org/TR/hr-time/
>+ * https://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute
No TR
https://w3c.github.io/navigation-timing/#the-performancenavigation-interface


> interface PerformanceNavigation {
>   const unsigned short TYPE_NAVIGATE = 0;
>   const unsigned short TYPE_RELOAD = 1;
>   const unsigned short TYPE_BACK_FORWARD = 2;
>   const unsigned short TYPE_RESERVED = 255;
> 
>   readonly attribute unsigned short type;
>   readonly attribute unsigned short redirectCount;
> 
>+  // XXX: this is not part of the spec, but any browser implements it.
>   [Default] object toJSON();
The comment is wrong.
toJSON is in https://w3c.github.io/navigation-timing/#the-performancenavigation-interface

> [Exposed=(Window,Worker)]
> interface PerformanceResourceTiming : PerformanceEntry
> {
>@@ -48,11 +48,9 @@ interface PerformanceResourceTiming : Pe
>   readonly attribute unsigned long long encodedBodySize;
>   [NeedsSubjectPrincipal]
>   readonly attribute unsigned long long decodedBodySize;
> 
>   // TODO: Use FrozenArray once available. (Bug 1236777)
>   // readonly attribute FrozenArray<PerformanceServerTiming> serverTiming;
>   [SecureContext, Frozen, Cached, Pure, NeedsSubjectPrincipal]
>   readonly attribute sequence<PerformanceServerTiming> serverTiming;
>-
>-  [Default] object toJSON();
Don't remove this. It is in https://w3c.github.io/resource-timing/#sec-performanceresourcetiming


>  * The origin of this IDL file is
>- * http://www.w3.org/TR/hr-time/
>+ * https://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface
No TR, please
https://w3c.github.io/navigation-timing/#dom-performancetiming



>@@ -46,10 +46,11 @@ interface PerformanceTiming {
>   readonly attribute unsigned long long timeToDOMContentFlushed;
> 
>   // This is a Chrome proprietary extension and not part of the
>   // performance/navigation timing specification.
>   // Returns 0 if a time-to-interactive measurement has not happened.
>   [Pref="dom.performance.time_to_first_interactive.enabled"]
>   readonly attribute unsigned long long timeToFirstInteractive;
> 
>+  // XXX: this is not part of the spec, but any browser implements it.
>   [Default] object toJSON();
The comment is wrong
See https://w3c.github.io/navigation-timing/#dom-performancetiming
Attachment #9022866 - Flags: review?(bugs) → review+

Comment 3

5 months ago
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c41c4eba7e02
Expose Performance.toJSON() in workers, r=smaug

Comment 4

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c41c4eba7e02
Status: NEW → RESOLVED
Last Resolved: 5 months ago
status-firefox65: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
I don't think this needs much more than an entry in the release notes, so I've decided to just add it:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/65#APIs
Keywords: dev-doc-complete
You need to log in before you can comment on or make changes to this bug.