PerformanceResourceTiming objects serialized as PerformanceEntry objects
Reported by
jsch...@twitter.com,
Mar 5 2016
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2664.1 Safari/537.36 Steps to reproduce the problem: 1. Visit any site, e.g. https://chromiumbugs.appspot.com 2. open JS console 3. enter performance.getEntriesByType('resource')[0] 4. observe object with ~20 keys, like connectStart, secureConnectionStart, etc (as shown in attachment) 5. enter JSON.stringify( performance.getEntriesByType('resource')[0] ) 6. Observe JSON string with < 5 keys, e.g. '"{"name":"https://chromiumbugs.appspot.com/static/css/wizard.css","entryType":"resource","startTime":340.26500000000004,"duration":322.91}"' What is the expected behavior? All entries present a PerformanceResourceTiming object should exist after serialization, e.g. { "initiatorType": "link", "redirectStart": 0, "redirectEnd": 0, "fetchStart": 340.26500000000004, "domainLookupStart": 340.26500000000004, "domainLookupEnd": 340.26500000000004, "connectStart": 340.26500000000004, "connectEnd": 340.26500000000004, "secureConnectionStart": 0, "requestStart": 384.77000000000004, "responseStart": 644.1550000000001, "responseEnd": 663.1750000000001, "workerStart": 0, "name": "https://chromiumbugs.appspot.com/static/css/wizard.css", "entryType": "resource", "startTime": 340.26500000000004, "duration": 322.91 } What went wrong? Many keys are missing. e.g. { "name": "https://chromiumbugs.appspot.com/static/css/wizard.css", "entryType": "resource", "startTime": 340.26500000000004, "duration": 322.91 } It appears to be serialized as a PerformanceEntry object, not a PerformanceResourceTiming object Did this work before? N/A Chrome version: 51.0.2664.1 Channel: canary OS Version: OS X 10.11.3 Flash Version: Shockwave Flash 21.0 r0 This applies to console's copy command as well
,
Mar 7 2016
,
Mar 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/48db6a49b37d8302a9bedd6321110546dccaf7eb commit 48db6a49b37d8302a9bedd6321110546dccaf7eb Author: ksakamoto <ksakamoto@chromium.org> Date: Fri Mar 11 08:11:07 2016 Fix JSON serialization of PerformanceEntry subclasses Attributes defined in PerformanceEntry subclasses were not included in serialized object because toJSONForBinding() wasn't polymorphic. BUG= 592171 test=http/tests/misc/performance-entry-serializer.html Review URL: https://codereview.chromium.org/1780523005 Cr-Commit-Position: refs/heads/master@{#380577} [add] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/LayoutTests/http/tests/misc/performance-entry-serializer.html [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceCompositeTiming.cpp [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceCompositeTiming.h [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceEntry.cpp [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceEntry.h [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceRenderTiming.cpp [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceRenderTiming.h [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp [modify] https://crrev.com/48db6a49b37d8302a9bedd6321110546dccaf7eb/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.h
,
Mar 11 2016
,
Apr 1 2016
Issue 587713 has been merged into this issue. |
|||
►
Sign in to add a comment |
|||
Comment 1 by kochi@chromium.org
, Mar 7 2016Owner: ksakamoto@chromium.org
Status: Assigned (was: Unconfirmed)