Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Issue 16434011: Support performance.now() in workers. (Closed)

Created:
7 years, 6 months ago by James Simonsen
Modified:
7 years, 6 months ago
CC:
blink-reviews, Nate Chapin, eae+blinkwatch, gavinp+loader_chromium.org, abarth-chromium, Andrew T Wilson (Slow), levin, Dmitry Titov
Visibility:
Public.

Description

Support performance.now() in workers, behind a runtime flag. performance.now() provides a high resolution monotonic clock. The time values start at an "origin time" instead of the typical UNIX epoch. For shared workers, the origin time is the time when the shared worker was created. For dedicated workers, the origin time is its document's navigationStart. That means performance.now() in the document and the dedicated worker should return values in the same range. BUG=169318 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152396

Patch Set 1 #

Patch Set 2 : Fix WorkerPerformance IDL #

Total comments: 16

Patch Set 3 : Use ContextDestructionObserver #

Patch Set 4 : Rebase #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -86 lines) Patch
A LayoutTests/http/tests/w3c/webperf/resources/worker.js View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-dedicated-basic.html View 1 2 1 chunk +48 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-dedicated-basic-expected.txt View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-shared-basic.html View 1 2 1 chunk +70 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-shared-basic-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/loader/DocumentLoadTiming.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/page/RuntimeEnabledFeatures.in View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/workers/DedicatedWorkerContext.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/workers/DedicatedWorkerContext.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/workers/DedicatedWorkerThread.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/workers/DedicatedWorkerThread.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M Source/core/workers/SharedWorkerContext.cpp View 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/workers/WorkerContext.h View 2 chunks +5 lines, -1 line 0 comments Download
M Source/core/workers/WorkerContext.cpp View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/workers/WorkerMessagingProxy.cpp View 2 chunks +3 lines, -1 line 0 comments Download
M Source/modules/modules.gypi View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
A Source/modules/performance/OWNERS View 1 chunk +2 lines, -0 lines 0 comments Download
A + Source/modules/performance/WorkerContextPerformance.h View 1 2 1 chunk +14 lines, -14 lines 0 comments Download
A + Source/modules/performance/WorkerContextPerformance.cpp View 1 2 3 1 chunk +19 lines, -21 lines 3 comments Download
A + Source/modules/performance/WorkerContextPerformance.idl View 1 chunk +3 lines, -5 lines 0 comments Download
A + Source/modules/performance/WorkerPerformance.h View 1 2 1 chunk +11 lines, -16 lines 3 comments Download
A + Source/modules/performance/WorkerPerformance.cpp View 1 2 3 1 chunk +13 lines, -10 lines 1 comment Download
A + Source/modules/performance/WorkerPerformance.idl View 1 2 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
James Simonsen
7 years, 6 months ago (2013-06-12 21:57:04 UTC) #1
abarth-chromium
https://codereview.chromium.org/16434011/diff/2001/LayoutTests/http/tests/w3c/webperf/resources/worker.js File LayoutTests/http/tests/w3c/webperf/resources/worker.js (right): https://codereview.chromium.org/16434011/diff/2001/LayoutTests/http/tests/w3c/webperf/resources/worker.js#newcode16 LayoutTests/http/tests/w3c/webperf/resources/worker.js:16: postMessage(JSON.stringify(results)); You probably don't need to use JSON encoding ...
7 years, 6 months ago (2013-06-12 23:11:41 UTC) #2
abarth-chromium
https://codereview.chromium.org/16434011/diff/2001/Source/modules/modules.gypi File Source/modules/modules.gypi (right): https://codereview.chromium.org/16434011/diff/2001/Source/modules/modules.gypi#newcode406 Source/modules/modules.gypi:406: 'performance/WorkerPerformance.h', Will we be able to add the main-thread ...
7 years, 6 months ago (2013-06-12 23:13:46 UTC) #3
James Simonsen
https://codereview.chromium.org/16434011/diff/2001/Source/modules/modules.gypi File Source/modules/modules.gypi (right): https://codereview.chromium.org/16434011/diff/2001/Source/modules/modules.gypi#newcode406 Source/modules/modules.gypi:406: 'performance/WorkerPerformance.h', On 2013/06/12 23:13:46, abarth wrote: > Will we ...
7 years, 6 months ago (2013-06-12 23:16:43 UTC) #4
James Simonsen
Thanks for taking the time to review this, Adam. https://codereview.chromium.org/16434011/diff/2001/LayoutTests/http/tests/w3c/webperf/resources/worker.js File LayoutTests/http/tests/w3c/webperf/resources/worker.js (right): https://codereview.chromium.org/16434011/diff/2001/LayoutTests/http/tests/w3c/webperf/resources/worker.js#newcode16 LayoutTests/http/tests/w3c/webperf/resources/worker.js:16: ...
7 years, 6 months ago (2013-06-13 00:01:36 UTC) #5
abarth-chromium
I'm probably not the right person to review the worker-specific pieces of this CL. Do ...
7 years, 6 months ago (2013-06-13 00:04:30 UTC) #6
James Simonsen
On 2013/06/13 00:04:30, abarth wrote: > I'm probably not the right person to review the ...
7 years, 6 months ago (2013-06-13 00:09:37 UTC) #7
Andrew T Wilson (Slow)
I made a pass through the worker changes and it LGTM. Other people who have ...
7 years, 6 months ago (2013-06-13 08:12:16 UTC) #8
abarth-chromium
LGTM Feel free to land once you feel like you've gotten enough feedback from worker ...
7 years, 6 months ago (2013-06-13 19:19:01 UTC) #9
levin
Just a few comments. https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerContextPerformance.cpp File Source/modules/performance/WorkerContextPerformance.cpp (right): https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerContextPerformance.cpp#newcode41 Source/modules/performance/WorkerContextPerformance.cpp:41: WorkerContextPerformance::WorkerContextPerformance() How is it deleted? ...
7 years, 6 months ago (2013-06-13 19:55:21 UTC) #10
abarth-chromium
https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerContextPerformance.cpp File Source/modules/performance/WorkerContextPerformance.cpp (right): https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerContextPerformance.cpp#newcode41 Source/modules/performance/WorkerContextPerformance.cpp:41: WorkerContextPerformance::WorkerContextPerformance() On 2013/06/13 19:55:22, levin wrote: > How is ...
7 years, 6 months ago (2013-06-13 20:18:19 UTC) #11
levin
lgtm https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerContextPerformance.cpp File Source/modules/performance/WorkerContextPerformance.cpp (right): https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerContextPerformance.cpp#newcode41 Source/modules/performance/WorkerContextPerformance.cpp:41: WorkerContextPerformance::WorkerContextPerformance() On 2013/06/13 20:18:19, abarth wrote: > On ...
7 years, 6 months ago (2013-06-13 22:19:07 UTC) #12
abarth-chromium
https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerPerformance.cpp File Source/modules/performance/WorkerPerformance.cpp (right): https://codereview.chromium.org/16434011/diff/19001/Source/modules/performance/WorkerPerformance.cpp#newcode55 Source/modules/performance/WorkerPerformance.cpp:55: return 1000.0 * (monotonicallyIncreasingTime() - workerContext->timeOrigin()); I missed it ...
7 years, 6 months ago (2013-06-13 22:27:16 UTC) #13
James Simonsen
Thanks for the reviews everyone. Dave raised some good points about how the time origin ...
7 years, 6 months ago (2013-06-13 22:38:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonjam@chromium.org/16434011/19001
7 years, 6 months ago (2013-06-13 22:38:30 UTC) #15
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=9589
7 years, 6 months ago (2013-06-14 00:29:33 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonjam@chromium.org/16434011/19001
7 years, 6 months ago (2013-06-14 00:31:19 UTC) #17
commit-bot: I haz the power
7 years, 6 months ago (2013-06-14 01:40:15 UTC) #18
Message was sent while issue was closed.
Change committed as 152396

Powered by Google App Engine
This is Rietveld 408576698