New issue
Advanced search Search tips

Issue 688542 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 688854



Sign in to add a comment

[hr-time] Performance time origin in Worker should be Worker moment of creation

Reported by joepec...@gmail.com, Feb 3 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.2999.0 Safari/537.36

Steps to reproduce the problem:
1. http://w3c-test.org/hr-time/window-worker-time-origin.html

What is the expected behavior?
Expected performance.now() in the Worker to be close to the Worker's moment of creation.

What went wrong?
performance.now() was relative to the Window's time origin, instead of the Worker.

Did this work before? No

Does this work in other browsers? Yes (WebKit Nightly)

Chrome version: 58.0.2999.0  Channel: canary
OS Version: OS X 10.12.4
Flash Version: 

See: https://github.com/w3c/hr-time/issues/41
Spec: https://w3c.github.io/hr-time/#time-origin-1

 
Labels: OS-Android OS-Chrome OS-Linux OS-Windows
Status: Available (was: Unconfirmed)
The spec of time origin of dedicated worker has changed in Feb 2015 (see https://github.com/w3c/hr-time/issues/1), but we haven't updated our implementation.

We have to implement performance.timeOrigin attribute as well so that users can translate timestamps across contexts.

Comment 2 by 23dow...@gmail.com, Feb 6 2017

X
Blocking: 688854
Owner: npm@chromium.org
Labels: Hotlist-PerformanceAPIs
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 18 2017

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

commit bf51abc39e5e4a9fa172821d999c054fe6bb2ed0
Author: Nicolas Pena <npm@chromium.org>
Date: Tue Jul 18 18:57:15 2017

Let the time origin of WorkerGlobalScope be its time of creation

In this CL, WorkerGlobalScope's |time_origin_| is set to the time of
creation. As a result, many time origins are no longer needed in
constructors.

Bug:  chromium:688542 
Change-Id: Ie15dccd7c81e6c29ad23244278fb7cc5131bdaf2
Reviewed-on: https://chromium-review.googlesource.com/563957
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487541}
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-dedicated-basic.html
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/DedicatedWorkerMessagingProxy.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/DedicatedWorkerMessagingProxy.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/DedicatedWorkerThread.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/DedicatedWorkerThread.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/SharedWorkerThread.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/WorkerThread.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/core/workers/WorkerThread.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerThread.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp
[modify] https://crrev.com/bf51abc39e5e4a9fa172821d999c054fe6bb2ed0/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h

Comment 8 by npm@chromium.org, Jul 18 2017

Cc: nhiroki@chromium.org jsb...@chromium.org
 Issue 688854  has been merged into this issue.

Comment 9 by npm@chromium.org, Jul 18 2017

Status: Fixed (was: Available)

Sign in to add a comment