Bug 73790

Summary: [EFL] Add RefPtrEfl specialization for evas_object.
Product: WebKit Reporter: KwangHyuk <hyuki.kim>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, leandro, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[EFL] Add RefPtrEfl specialization for evas_object.
rniwa: review-
Patch updated.
gyuyoung.kim: commit-queue-
Patch. none

Description KwangHyuk 2011-12-04 18:13:37 PST
As evas_object is also based on reference count, RefPtr is applied for evas_object.
Comment 1 KwangHyuk 2011-12-07 20:01:19 PST
Created attachment 118316 [details]
[EFL] Add RefPtrEfl specialization for evas_object.

As evas_object is also based on reference count, RefPtr is applied for evas_object.
Comment 2 KwangHyuk 2011-12-08 21:17:25 PST
FYI, as evas_object_del doesn't unref object by itself, both evas_object_unref and evas_object_del are required for derefIfNotNull.

EAPI void
evas_object_del(Evas_Object *obj)
{
   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();

   if (obj->delete_me) return;

   if (obj->ref > 0)
     {
        obj->del_ref = 1;
        return;
     }
Comment 3 Ryosuke Niwa 2011-12-08 22:43:52 PST
Comment on attachment 118316 [details]
[EFL] Add RefPtrEfl specialization for evas_object.

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

> Source/WebCore/platform/efl/RefPtrEfl.cpp:28
> +    if (LIKELY(ptr != 0))

WebKit style is not to compare with 0. So you should do LIKELY(ptr) or LIKELY(!!ptr)
Comment 4 KwangHyuk 2011-12-08 23:36:34 PST
Created attachment 118538 [details]
Patch updated.
Comment 5 Gyuyoung Kim 2011-12-08 23:40:55 PST
Comment on attachment 118538 [details]
Patch updated.

Attachment 118538 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/10790616
Comment 6 KwangHyuk 2011-12-09 00:26:04 PST
Created attachment 118542 [details]
Patch.
Comment 7 WebKit Review Bot 2011-12-09 15:26:53 PST
Comment on attachment 118542 [details]
Patch.

Clearing flags on attachment: 118542

Committed r102480: <http://trac.webkit.org/changeset/102480>
Comment 8 WebKit Review Bot 2011-12-09 15:26:58 PST
All reviewed patches have been landed.  Closing bug.