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

Issue 1550563002: Blink Platform: Remove time functions from Platform. (Closed)

Created:
4 years, 12 months ago by Yuta Kitamura
Modified:
4 years, 10 months ago
CC:
Mads Ager (chromium), ajuma+watch-canvas_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-bindings_chromium.org, blink-reviews-html_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-wtf_chromium.org, Rik, chromium-reviews, danakj, darin-cc_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, dtapuska, f(malita), gavinp+loader_chromium.org, jam, Nate Chapin, jbroman, Justin Novosad, kinuko+watch, kouhei+heap_chromium.org, loading-reviews+fetch_chromium.org, Mikhail, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, oilpan-reviews, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, tyoshino+watch_chromium.org, vmpstr+blinkwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Blink Platform: Remove time functions from Platform. Simplification! To support the use case of mocking timers for tests, CurrentTime.h now provides a customization function. Currently, it overrides the three functions at once, but practically that wouldn't be a problem. Some unit tests try to override timing functions by replacing Platform. However, CachingCorrectnessTest and TextFinderTest seemed to fail to do so, as they apparently lacked Platform::initialize() calls. I'm not sure why these tests have not been failing. Anyways, this patch "fixes" these issues, too. BUG=565765 Committed: https://crrev.com/a5466f457a195abd0f03066439c0efae3b5e14b0 Cr-Commit-Position: refs/heads/master@{#375524}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Patch necromancy. #

Patch Set 3 : Fix merge failure. #

Patch Set 4 : Merge again. #

Total comments: 12

Patch Set 5 : Revert lambdas. #

Patch Set 6 : Merrrge agaaain. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -124 lines) Patch
M content/child/blink_platform_impl.h View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M content/child/blink_platform_impl.cc View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8GCForContextDispose.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp View 1 2 3 5 chunks +15 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/Database.cpp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/Timer.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/TimerTest.cpp View 1 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.cpp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapPage.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/SafePoint.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 4 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/RunAllTests.cpp View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebKit.cpp View 1 2 chunks +1 line, -11 lines 0 comments Download
M third_party/WebKit/Source/web/tests/TextFinderTest.cpp View 1 2 3 1 chunk +22 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/wtf/CurrentTime.h View 1 1 chunk +8 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/CurrentTime.cpp View 1 1 chunk +15 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/wtf/DEPS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/ThreadingPthreads.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/WTF.h View 1 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/wtf/WTF.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/testing/RunAllTests.cpp View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 1 2 3 4 5 1 chunk +0 lines, -8 lines 0 comments Download

Messages

Total messages: 58 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550563002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550563002/1
4 years, 12 months ago (2015-12-25 07:18:11 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/131555)
4 years, 12 months ago (2015-12-25 07:26:44 UTC) #4
Yuta Kitamura
(No rush, I don't expect this to get landed this year.)
4 years, 12 months ago (2015-12-25 09:03:44 UTC) #6
haraken
LGTM I'm just curious but does this CL speed up performance.now()? The slowness of performance.now() ...
4 years, 11 months ago (2015-12-28 02:24:27 UTC) #7
Yuta Kitamura
https://codereview.chromium.org/1550563002/diff/1/third_party/WebKit/Source/platform/testing/RunAllTests.cpp File third_party/WebKit/Source/platform/testing/RunAllTests.cpp (right): https://codereview.chromium.org/1550563002/diff/1/third_party/WebKit/Source/platform/testing/RunAllTests.cpp#newcode62 third_party/WebKit/Source/platform/testing/RunAllTests.cpp:62: WTF::setTimeFunctionsForTesting([]() -> double { On 2015/12/28 02:24:27, haraken wrote: ...
4 years, 11 months ago (2016-01-05 05:31:06 UTC) #8
Yuta Kitamura
On 2015/12/28 02:24:27, haraken wrote: > LGTM > > I'm just curious but does this ...
4 years, 11 months ago (2016-01-05 06:49:07 UTC) #9
haraken
On 2016/01/05 06:49:07, Yuta Kitamura wrote: > On 2015/12/28 02:24:27, haraken wrote: > > LGTM ...
4 years, 11 months ago (2016-01-05 06:49:57 UTC) #10
esprehn
https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc File content/renderer/renderer_blink_platform_impl.cc (left): https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc#oldcode289 content/renderer/renderer_blink_platform_impl.cc:289: return renderer_scheduler_->MonotonicallyIncreasingTimeSeconds(); The scheduler implements virtual time, where is ...
4 years, 11 months ago (2016-01-05 07:01:09 UTC) #11
Yuta Kitamura
https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc File content/renderer/renderer_blink_platform_impl.cc (left): https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc#oldcode289 content/renderer/renderer_blink_platform_impl.cc:289: return renderer_scheduler_->MonotonicallyIncreasingTimeSeconds(); On 2016/01/05 07:01:09, esprehn wrote: > The ...
4 years, 11 months ago (2016-01-05 09:17:46 UTC) #13
alex clarke (OOO till 29th)
https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc File content/renderer/renderer_blink_platform_impl.cc (left): https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc#oldcode289 content/renderer/renderer_blink_platform_impl.cc:289: return renderer_scheduler_->MonotonicallyIncreasingTimeSeconds(); On 2016/01/05 09:17:46, Yuta Kitamura wrote: > ...
4 years, 11 months ago (2016-01-05 10:49:24 UTC) #14
Yuta Kitamura
On 2016/01/05 10:49:24, alexclarke1 wrote: > https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc > File content/renderer/renderer_blink_platform_impl.cc (left): > > https://codereview.chromium.org/1550563002/diff/1/content/renderer/renderer_blink_platform_impl.cc#oldcode289 > ...
4 years, 11 months ago (2016-01-07 07:51:14 UTC) #15
esprehn
I don't think this is okay, ghost rider should not be imposing a 5% penalty ...
4 years, 11 months ago (2016-01-07 08:57:14 UTC) #16
esprehn
I don't think this is okay, ghost rider should not be imposing a 5% penalty ...
4 years, 11 months ago (2016-01-07 09:03:25 UTC) #17
alex clarke (OOO till 29th)
I don't want ghost rider to block this patch, I suggest you land it and ...
4 years, 11 months ago (2016-01-07 10:42:25 UTC) #18
dtapuska
On 2016/01/07 10:42:25, alexclarke1 wrote: > I don't want ghost rider to block this patch, ...
4 years, 10 months ago (2016-02-05 18:17:50 UTC) #19
esprehn
On 2016/02/05 at 18:17:50, dtapuska wrote: > On 2016/01/07 10:42:25, alexclarke1 wrote: > > I ...
4 years, 10 months ago (2016-02-06 02:49:12 UTC) #21
Yuta Kitamura
On 2016/02/06 02:49:12, esprehn wrote: > On 2016/02/05 at 18:17:50, dtapuska wrote: > > On ...
4 years, 10 months ago (2016-02-08 09:56:53 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550563002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550563002/20001
4 years, 10 months ago (2016-02-08 10:35:24 UTC) #24
Yuta Kitamura
OK I think PS2 is up-to-date, PTAL: haraken: overall, for sanity check between PS1 and ...
4 years, 10 months ago (2016-02-08 10:46:54 UTC) #26
alex clarke (OOO till 29th)
On 2016/02/05 18:17:50, dtapuska wrote: > On 2016/01/07 10:42:25, alexclarke1 wrote: > > I don't ...
4 years, 10 months ago (2016-02-08 10:53:44 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/177707)
4 years, 10 months ago (2016-02-08 11:37:13 UTC) #29
jam
lgtm
4 years, 10 months ago (2016-02-08 17:21:11 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550563002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550563002/40001
4 years, 10 months ago (2016-02-09 08:15:59 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/128306) ios_rel_device_ninja on ...
4 years, 10 months ago (2016-02-09 08:19:24 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550563002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550563002/60001
4 years, 10 months ago (2016-02-09 08:36:01 UTC) #36
Yuta Kitamura
haraken, tkent: PTAL? PS4 seems fine. haraken: overall, for sanity check between PS1 and 4 ...
4 years, 10 months ago (2016-02-09 09:07:22 UTC) #37
Yuta Kitamura
haraken, tkent: PTAL? PS4 seems fine. haraken: overall, for sanity check between PS1 and 4 ...
4 years, 10 months ago (2016-02-09 09:07:23 UTC) #38
haraken
Sorry, I missed this one... https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp File third_party/WebKit/Source/platform/testing/RunAllTests.cpp (right): https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp#newcode57 third_party/WebKit/Source/platform/testing/RunAllTests.cpp:57: WTF::setTimeFunctionsForTesting([]() -> double { ...
4 years, 10 months ago (2016-02-09 09:13:59 UTC) #39
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/177186)
4 years, 10 months ago (2016-02-09 09:37:02 UTC) #41
Yuta Kitamura
https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp File third_party/WebKit/Source/platform/testing/RunAllTests.cpp (right): https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp#newcode57 third_party/WebKit/Source/platform/testing/RunAllTests.cpp:57: WTF::setTimeFunctionsForTesting([]() -> double { On 2016/02/09 09:13:58, haraken wrote: ...
4 years, 10 months ago (2016-02-09 09:54:57 UTC) #42
esprehn
Are we actually building with PGO enabled anywhere? We do something like that on windows, ...
4 years, 10 months ago (2016-02-09 10:20:48 UTC) #43
tkent
third_party/WebKit lgtm https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp File third_party/WebKit/Source/platform/testing/RunAllTests.cpp (right): https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp#newcode57 third_party/WebKit/Source/platform/testing/RunAllTests.cpp:57: WTF::setTimeFunctionsForTesting([]() -> double { On 2016/02/09 at ...
4 years, 10 months ago (2016-02-10 00:04:39 UTC) #44
Yuta Kitamura
haraken: PTAL? https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp File third_party/WebKit/Source/platform/testing/RunAllTests.cpp (right): https://codereview.chromium.org/1550563002/diff/60001/third_party/WebKit/Source/platform/testing/RunAllTests.cpp#newcode57 third_party/WebKit/Source/platform/testing/RunAllTests.cpp:57: WTF::setTimeFunctionsForTesting([]() -> double { On 2016/02/10 00:04:39, ...
4 years, 10 months ago (2016-02-15 07:26:39 UTC) #45
haraken
LGTM
4 years, 10 months ago (2016-02-15 07:34:06 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550563002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550563002/80001
4 years, 10 months ago (2016-02-15 10:27:53 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/130955) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 10 months ago (2016-02-15 10:30:30 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1550563002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1550563002/100001
4 years, 10 months ago (2016-02-16 05:48:28 UTC) #54
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-16 06:58:58 UTC) #56
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:51:36 UTC) #58
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/a5466f457a195abd0f03066439c0efae3b5e14b0
Cr-Commit-Position: refs/heads/master@{#375524}

Powered by Google App Engine
This is Rietveld 408576698