Bug 20318

Summary: [Gtk] SharedTimerGtk should use G_PRIORITY_DEFAULT_IDLE for g_idle_add
Product: WebKit Reporter: Jan Alonzo <jmalonzo>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alp
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
use G_PRIORITY_DEFAULT_IDLE for g_idle_add function
none
updated to use g_idle_add rather than the _full variant zecke: review+

Description Jan Alonzo 2008-08-07 07:34:43 PDT
In setSharedTimerFireTime:

     if (intervalInMS == 0)
-        sharedTimer = g_idle_add_full(G_PRIORITY_DEFAULT, timeout_cb, NULL, NULL);
+        sharedTimer = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, timeout_cb, NULL, NULL);

I'm attaching a patch for this.
Comment 1 Jan Alonzo 2008-08-07 07:37:30 PDT
Created attachment 22697 [details]
use G_PRIORITY_DEFAULT_IDLE for g_idle_add function
Comment 2 Alp Toker 2008-08-07 08:49:30 PDT
(In reply to comment #0)
> In setSharedTimerFireTime:
> 
>      if (intervalInMS == 0)
> -        sharedTimer = g_idle_add_full(G_PRIORITY_DEFAULT, timeout_cb, NULL,
> NULL);
> +        sharedTimer = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, timeout_cb,
> NULL, NULL);
> 
> I'm attaching a patch for this.
> 

Did this cause incorrect behaviour or is this patch just a cleanup? How about just using g_idle_add() (docs suggest it does the same thing)?
Comment 3 Jan Alonzo 2008-08-08 17:50:25 PDT
Created attachment 22715 [details]
updated to use g_idle_add rather than the _full variant

Hi Alp

This is just a cleanup. I've updated the patch to use g_idle_add rather than g_idle_add_full.
Comment 4 Holger Freyther 2008-08-12 13:31:14 PDT
Comment on attachment 22715 [details]
updated to use g_idle_add rather than the _full variant

Please adjust the changelog when landing. According to the glib documentation g_idle_add is there from the beginning so we can safely use that.
Comment 5 Jan Alonzo 2008-08-13 12:43:16 PDT
landed in r35724