WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
169537
[WTF] Clean up RunLoop and WorkQueue with Seconds and Function
https://bugs.webkit.org/show_bug.cgi?id=169537
Summary
[WTF] Clean up RunLoop and WorkQueue with Seconds and Function
Yusuke Suzuki
Reported
2017-03-12 21:08:07 PDT
[WTF] Clean up RunLoop and WorkQueue with Seconds and Function
Attachments
Patch
(27.10 KB, patch)
2017-03-12 21:09 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(4.12 KB, patch)
2017-03-14 04:52 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(8.92 KB, patch)
2017-03-14 05:38 PDT
,
Yusuke Suzuki
cgarcia
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2017-03-12 21:09:42 PDT
Created
attachment 304220
[details]
Patch
Yusuke Suzuki
Comment 2
2017-03-13 11:27:21 PDT
Comment on
attachment 304220
[details]
Patch Thanks!
WebKit Commit Bot
Comment 3
2017-03-13 11:56:58 PDT
Comment on
attachment 304220
[details]
Patch Clearing flags on attachment: 304220 Committed
r213858
: <
http://trac.webkit.org/changeset/213858
>
WebKit Commit Bot
Comment 4
2017-03-13 11:57:05 PDT
All reviewed patches have been landed. Closing bug.
Carlos Garcia Campos
Comment 5
2017-03-14 04:05:11 PDT
Comment on
attachment 304220
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=304220&action=review
> Source/WTF/wtf/glib/RunLoopGLib.cpp:-198 > - auto intervalDuration = std::chrono::duration<double>(fireInterval); > - auto safeDuration = std::chrono::microseconds::max(); > - if (intervalDuration < safeDuration) > - safeDuration = std::chrono::duration_cast<std::chrono::microseconds>(intervalDuration);
Something like this is still needed. GSoure works with microseconds, when std::numeric_limits<double>::infinity() is passed here (like XMLHttpRequest does to disable network timeouts), we will overflow later when trying to convert infinity to microseconds
Carlos Garcia Campos
Comment 6
2017-03-14 04:18:46 PDT
Comment on
attachment 304220
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=304220&action=review
> Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:42 > - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, duration.count()), m_dispatchQueue, BlockPtr<void ()>::fromCallable([protectedThis = makeRef(*this), function = WTFMove(function)] { > + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, duration.nanoseconds()), m_dispatchQueue, BlockPtr<void()>::fromCallable([protectedThis = makeRef(*this), function = WTFMove(function)] {
This could also overflow now, I think. It doesn't probably happen because dispatchAfter is never called with infinity or a long enough value.
Yusuke Suzuki
Comment 7
2017-03-14 04:52:10 PDT
Reopening to attach new patch.
Yusuke Suzuki
Comment 8
2017-03-14 04:52:15 PDT
Created
attachment 304372
[details]
Patch
Yusuke Suzuki
Comment 9
2017-03-14 05:38:04 PDT
Created
attachment 304373
[details]
Patch
Carlos Garcia Campos
Comment 10
2017-03-14 06:09:56 PDT
Comment on
attachment 304373
[details]
Patch This looks good to me. Thanks.
Yusuke Suzuki
Comment 11
2017-03-14 06:21:07 PDT
Committed
r213896
: <
http://trac.webkit.org/changeset/213896
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug