New issue
Advanced search Search tips

Issue 876324 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[UserTimingL3] L2 behavior of passing undefined to start changes

Project Member Reported by maxlg@google.com, Aug 21

Issue description

As in https://github.com/w3c/user-timing/issues/44, M68 introduced an issue to performance.measure API while introducing User Timing L3 API to User Timing L2 API.

Before M68,
Performance.measure('name', undefined, 'mark') would generate a measure object with start === 0.

After M68,
Performance.measure('name', undefined, 'mark') complains that "null" is not found.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 22

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

commit 3152c6f70f331e4502b3146c6e69fa3ddea8c21d
Author: Liquan(Max) Gu <maxlg@chromium.org>
Date: Wed Aug 22 17:05:26 2018

[UserTiming] Correct measure where start is undefined

According to spec, if start is undefined for performance.measure(), 0 will be
used as the start time. However, the current implementation treats undefined as
"null".

This CL doesn't solve all the problems. For backward compatibility, L2 should
treat undefined passed to start/end as empty, null as a string 'null'. As a
temporary fix, we treat both null and undefined as undefined, which is safer
than as 'null'.

Bug: 876324

Change-Id: I7d74d6be9552d090ab7f28342be9a739017bf59b
Reviewed-on: https://chromium-review.googlesource.com/1180345
Commit-Queue: Liquan (Max) Gǔ <maxlg@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585103}
[modify] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/WebKit/LayoutTests/external/wpt/user-timing/measure.html
[modify] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/WebKit/LayoutTests/fast/performance/performance-measure-exceptions-expected.txt
[modify] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/WebKit/LayoutTests/fast/performance/performance-measure-exceptions.html
[add] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/WebKit/LayoutTests/fast/performance/performance-measure-null-exception-expected.txt
[add] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/WebKit/LayoutTests/fast/performance/performance-measure-null-exception.html
[modify] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/blink/renderer/core/timing/performance.cc
[modify] https://crrev.com/3152c6f70f331e4502b3146c6e69fa3ddea8c21d/third_party/blink/renderer/core/timing/performance.h

Is this fixed?

Sign in to add a comment