RESOLVED FIXED 137782
[GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
https://bugs.webkit.org/show_bug.cgi?id=137782
Summary [GLIB] Add API to GMainLoopSource to schedule sources after a delay in micros...
Carlos Garcia Campos
Reported 2014-10-16 10:56:31 PDT
In some cases when we have a double with the time in seconds, the conversion to milliseconds ends up truncating the value to 0, and the source scheduled immediately.
Attachments
Patch (10.76 KB, patch)
2014-10-16 11:04 PDT, Carlos Garcia Campos
no flags
Re-submitted for EWS (10.76 KB, patch)
2014-10-16 11:20 PDT, Carlos Garcia Campos
svillar: review+
Carlos Garcia Campos
Comment 1 2014-10-16 11:04:16 PDT
Carlos Garcia Campos
Comment 2 2014-10-16 11:20:18 PDT
Created attachment 239954 [details] Re-submitted for EWS
WebKit Commit Bot
Comment 3 2014-10-16 11:22:43 PDT
Attachment 239954 [details] did not pass style-queue: ERROR: Source/WTF/wtf/gobject/GMainLoopSource.cpp:265: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WTF/wtf/gobject/GMainLoopSource.cpp:282: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sergio Villar Senin
Comment 4 2014-10-17 01:15:58 PDT
Comment on attachment 239954 [details] Re-submitted for EWS View in context: https://bugs.webkit.org/attachment.cgi?id=239954&action=review > Source/WTF/wtf/gobject/GMainLoopSource.cpp:295 > + }; Either one of these two is wrong, check the position of WTF::move and the one of the callback. > Source/WTF/wtf/gobject/GMainLoopSource.cpp:338 > + Since the only difference is the callback function, couldn't we use a template and avoid repetitions?
Carlos Garcia Campos
Comment 5 2014-10-17 01:38:42 PDT
Comment on attachment 239954 [details] Re-submitted for EWS View in context: https://bugs.webkit.org/attachment.cgi?id=239954&action=review >> Source/WTF/wtf/gobject/GMainLoopSource.cpp:295 >> + }; > > Either one of these two is wrong, check the position of WTF::move and the one of the callback. I don't understand what you mean. There are two WTF::move here one is for the destroy func and the other is for the bool callback. There's nothing wrong there. >> Source/WTF/wtf/gobject/GMainLoopSource.cpp:338 >> + > > Since the only difference is the callback function, couldn't we use a template and avoid repetitions? I guess, I find this more convenient to use, but in any case, that would be a different issue.
Sergio Villar Senin
Comment 6 2014-10-17 02:39:18 PDT
Comment on attachment 239954 [details] Re-submitted for EWS View in context: https://bugs.webkit.org/attachment.cgi?id=239954&action=review >>> Source/WTF/wtf/gobject/GMainLoopSource.cpp:295 >>> + }; >> >> Either one of these two is wrong, check the position of WTF::move and the one of the callback. > > I don't understand what you mean. There are two WTF::move here one is for the destroy func and the other is for the bool callback. There's nothing wrong there. I was talking about the voidCallback and the boolCallback, but they're correctly placed anyway, just checked the Context struct.
Carlos Garcia Campos
Comment 7 2014-10-17 03:10:54 PDT
Note You need to log in before you can comment on or make changes to this bug.