Bug 80119

Summary: [EFL] Add OwnPtr specialization for Ecore_Timer
Product: WebKit Reporter: YoungTaeck Song <youngtaeck.song>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, lucas.de.marchi, rakuco, ryuan.choi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 62777    
Attachments:
Description Flags
patch
none
Patch
none
Patch
none
Patch none

Description YoungTaeck Song 2012-03-02 00:12:29 PST
Add an overload for deleteOwnedPtr(Ecore_Timer*) on EFL port.
Comment 1 YoungTaeck Song 2012-03-02 00:17:41 PST
Created attachment 129833 [details]
patch
Comment 2 Ryuan Choi 2012-03-02 00:21:37 PST
How do you think about applying this in SharedTimerEfl.cpp and somewhere Ecore_Timer is used ?
Comment 3 YoungTaeck Song 2012-03-02 02:23:52 PST
(In reply to comment #2)
> How do you think about applying this in SharedTimerEfl.cpp and somewhere Ecore_Timer is used ?

This patch for RunLoopEfl.cpp. Please see https://bugs.webkit.org/attachment.cgi?id=129848&action=review.
So I think it's not suitable to using SharedTimerEfl.cpp
Comment 4 YoungTaeck Song 2012-03-04 23:16:35 PST
Created attachment 130057 [details]
Patch
Comment 5 YoungTaeck Song 2012-03-04 23:22:18 PST
(In reply to comment #2)
> How do you think about applying this in SharedTimerEfl.cpp and somewhere Ecore_Timer is used ?

Sorry, Ryuan. I misunderstood your intentions.
I changed SharedTimerEfl.cpp to use OwnPtr<Ecore_timer> at next patch.
Comment 6 Ryuan Choi 2012-03-04 23:31:28 PST
(In reply to comment #5)
> (In reply to comment #2)
> > How do you think about applying this in SharedTimerEfl.cpp and somewhere Ecore_Timer is used ?
> 
> Sorry, Ryuan. I misunderstood your intentions.
> I changed SharedTimerEfl.cpp to use OwnPtr<Ecore_timer> at next patch.

You are missing WebCore's ChangeLog.
Comment 7 YoungTaeck Song 2012-03-05 00:33:04 PST
Created attachment 130066 [details]
Patch
Comment 8 Ryuan Choi 2012-03-05 00:36:18 PST
(In reply to comment #7)
> Created an attachment (id=130066) [details]
> Patch

Looks good to me.
Comment 9 Raphael Kubo da Costa (:rakuco) 2012-03-05 10:06:08 PST
Comment on attachment 130066 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=130066&action=review

> Source/WebCore/platform/efl/SharedTimerEfl.cpp:41
> -static Ecore_Timer *_sharedTimer = 0;
> +static OwnPtr<Ecore_Timer> sharedTimer;

Declaring a static object like this makes the code prone to all sorts of problems, since you can't guarantee when this object will be initialized. Either keep the old version, or use the DEFINE_STATIC_LOCAL macro to make sure the object is created on first use.
Comment 10 YoungTaeck Song 2012-03-05 17:36:48 PST
Created attachment 130247 [details]
Patch
Comment 11 YoungTaeck Song 2012-03-05 17:38:59 PST
(In reply to comment #9)
> (From update of attachment 130066 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=130066&action=review
> 
> > Source/WebCore/platform/efl/SharedTimerEfl.cpp:41
> > -static Ecore_Timer *_sharedTimer = 0;
> > +static OwnPtr<Ecore_Timer> sharedTimer;
> 
> Declaring a static object like this makes the code prone to all sorts of problems, since you can't guarantee when this object will be initialized. Either keep the old version, or use the DEFINE_STATIC_LOCAL macro to make sure the object is created on first use.

Thanks for your review.
We decided to keep the old version.
Comment 12 Raphael Kubo da Costa (:rakuco) 2012-03-05 17:56:04 PST
Comment on attachment 130247 [details]
Patch

Looks OK to me.
Comment 13 Gyuyoung Kim 2012-03-08 18:15:01 PST
Comment on attachment 130247 [details]
Patch

LGTM.
Comment 14 WebKit Review Bot 2012-03-15 12:55:57 PDT
Comment on attachment 130247 [details]
Patch

Clearing flags on attachment: 130247

Committed r110876: <http://trac.webkit.org/changeset/110876>
Comment 15 WebKit Review Bot 2012-03-15 12:56:02 PDT
All reviewed patches have been landed.  Closing bug.