Bug 137782 - [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
Summary: [GLIB] Add API to GMainLoopSource to schedule sources after a delay in micros...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2014-10-16 10:56 PDT by Carlos Garcia Campos
Modified: 2014-10-17 03:10 PDT (History)
6 users (show)

See Also:


Attachments
Patch (10.76 KB, patch)
2014-10-16 11:04 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Re-submitted for EWS (10.76 KB, patch)
2014-10-16 11:20 PDT, Carlos Garcia Campos
svillar: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 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.
Comment 1 Carlos Garcia Campos 2014-10-16 11:04:16 PDT
Created attachment 239953 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-10-16 11:20:18 PDT
Created attachment 239954 [details]
Re-submitted for EWS
Comment 3 WebKit Commit Bot 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.
Comment 4 Sergio Villar Senin 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?
Comment 5 Carlos Garcia Campos 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.
Comment 6 Sergio Villar Senin 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.
Comment 7 Carlos Garcia Campos 2014-10-17 03:10:54 PDT
Committed r174818: <http://trac.webkit.org/changeset/174818>