Changeset 239202 in webkit
- Timestamp:
- Dec 14, 2018 4:14:40 AM (5 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r239195 r239202 1 2018-12-14 Zan Dobersek <zdobersek@igalia.com> 2 3 [GLib] RunLoop::dispatchAfter() GSource requires microsecond precision 4 https://bugs.webkit.org/show_bug.cgi?id=192696 5 6 Reviewed by Michael Catanzaro. 7 8 The GSource we set up in GLib's RunLoop::dispatchAfter() implementation 9 should support microsecond-precision delays. Such delays are common in 10 JSC's Watchdog implementation and missing support for them has been 11 causing test failures in the `testapi` program as well as some JSC 12 tests that depend on the termination determination functionality of the 13 JSC::Watchdog class. 14 15 RunLoop::dispatchAfter() is changed to spawn a raw GSource that uses the 16 existing GSourceFuncs implementation used elsewhere in GLib's RunLoop. 17 The GSource's ready time is set manually, now with the necessary 18 microsecond precision. 19 20 * wtf/glib/RunLoopGLib.cpp: 21 (WTF::RunLoop::dispatchAfter): 22 1 23 2018-12-13 Saam Barati <sbarati@apple.com> 2 24 -
trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp
r237099 r239202 143 143 void RunLoop::dispatchAfter(Seconds duration, Function<void()>&& function) 144 144 { 145 GRefPtr<GSource> source = adoptGRef(g_ timeout_source_new(duration.millisecondsAs<guint>()));145 GRefPtr<GSource> source = adoptGRef(g_source_new(&runLoopSourceFunctions, sizeof(GSource))); 146 146 g_source_set_priority(source.get(), RunLoopSourcePriority::RunLoopTimer); 147 147 g_source_set_name(source.get(), "[WebKit] RunLoop dispatchAfter"); 148 g_source_set_ready_time(source.get(), g_get_monotonic_time() + duration.microsecondsAs<gint64>()); 148 149 149 150 std::unique_ptr<DispatchAfterContext> context = std::make_unique<DispatchAfterContext>(WTFMove(function));
Note: See TracChangeset
for help on using the changeset viewer.