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.
Created attachment 239953 [details] Patch
Created attachment 239954 [details] Re-submitted for EWS
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.
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?
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.
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.
Committed r174818: <http://trac.webkit.org/changeset/174818>