New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 740094 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Add PerformanceEntry::toJSON

Project Member Reported by tdres...@chromium.org, Jul 7 2017

Issue description

PerformanceEntry is missing toJSON support.
 
Cc: igrigo...@chromium.org
Ilya, can you provide some context here?

Is there spec work required?
Cc: tdres...@chromium.org panicker@chromium.org
Labels: Hotlist-PerformanceAPIs OS-All
A bit of historical context.. Per spec, toJSON support was *not* required on PerformanceEntry or any subclasses of it. That said, in practice, Firefox, IE/Edge, and Safari implemented it and Chrome was/is the only one that doesn't support it. As an aside, this is a bit of a sore point with developers and I often field questions as to why Chrome doesn't support this.

More recently, this came to a head in light of "WebIDL serializer has been deprecated in favor of toJSON operation" [1]. Based on above, we're now making toJSON a requirement on PerformanceEntry, and hence need to add support for this in Chrome.

Affected interfaces are: 
- Performance
- PerformanceEntry
- PerformanceResourceTiming
- PerformanceNavigationTiming and PerformanceTiming
- PerformanceLongTaskTiming
- PerformancePaintTiming
- ...

Basically, everything that can be delivered to a PerformanceObserver, or retrieved via performance.getEntries().

We've landed spec updates for most of the above and a few are still pending. That said, that shouldn't block the work here.

[1] https://github.com/w3c/resource-timing/issues/112
Status: Available (was: Untriaged)
Owner: npm@chromium.org
Status: Assigned (was: Available)
Nicolas can this go on your plate? It's fairly low priority relative to the other stuff on your plate.

Comment 5 by npm@chromium.org, Nov 30 2017

There's already some of these supported:
- Performance (although I think not for Worker?)
- PerformanceEntry
- PerformanceNavigationTiming
- PerformanceTiming

And I don't know if this is needed for PerformancePaintTiming since it does not add any attributes to what PerformanceEntry already had. Maybe it can just be added if/when it adds something extra to PerformancePaintTiming.
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1278739add31c47c73d424dc561500973d4cbe4d

commit 1278739add31c47c73d424dc561500973d4cbe4d
Author: Nicolas Pena <npm@chromium.org>
Date: Tue Dec 12 20:58:45 2017

Add toJSON to some performance idls

This CL adds toJSON to the following:
* PerformanceLongTaskTiming
* PerformanceResourceTiming
* TaskAttributionTiming
* Performance within workers

Link to Intent to Implement and Ship thread:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/ZnXvNe_wNyk

Bug:  740094 
Change-Id: I54622b9bd213fd806a9108598ccf4798c2ceffa2
Reviewed-on: https://chromium-review.googlesource.com/802019
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523532}
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
[delete] https://crrev.com/b879bf58941c51126fa3a767f2ede5e6c316b2a1/third_party/WebKit/LayoutTests/external/wpt/hr-time/idlharness-expected.txt
[delete] https://crrev.com/b879bf58941c51126fa3a767f2ede5e6c316b2a1/third_party/WebKit/LayoutTests/external/wpt/resource-timing/idlharness-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/external/wpt/workers/worker-performance.worker.js
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/Performance.cpp
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/Performance.h
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceBase.h
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceEntry.cpp
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceEntry.h
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceLongTaskTiming.cpp
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceLongTaskTiming.h
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceLongTaskTiming.idl
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.cpp
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.h
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.h
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.idl
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/TaskAttributionTiming.cpp
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/TaskAttributionTiming.h
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/TaskAttributionTiming.idl
[modify] https://crrev.com/1278739add31c47c73d424dc561500973d4cbe4d/third_party/WebKit/Source/core/timing/WorkerPerformance.idl

Comment 8 by npm@chromium.org, Jan 4 2018

Status: Fixed (was: Assigned)

Sign in to add a comment