Bug 92072

Summary: [EFL] Use eina_stringshare_add instead of strdup.
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit EFLAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, haraken, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 92349    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Gyuyoung Kim 2012-07-24 00:43:47 PDT
Eina of EFL libraries supports string functionality like strdup. So, EFL port needs to replace strdup with eina_stringshare_add. Patch is coming.
Comment 1 Chris Dumez 2012-07-24 00:49:40 PDT
Yes, I was think the same. Thanks for working on this.
Comment 2 Gyuyoung Kim 2012-07-24 02:24:01 PDT
Created attachment 153994 [details]
Patch
Comment 3 Gyuyoung Kim 2012-07-24 02:24:53 PDT
Comment on attachment 153994 [details]
Patch

This patch is working in progress. I need to check this patch further.
Comment 4 Gyuyoung Kim 2012-07-24 23:40:00 PDT
Created attachment 154271 [details]
Patch
Comment 5 Chris Dumez 2012-07-24 23:50:09 PDT
Comment on attachment 154271 [details]
Patch

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

> Source/WebKit/efl/ChangeLog:8
> +        Eina of EFL libraries supports a string functionality like strdup. So, EFL port needs

"like eina stringsharing"

> Source/WebKit/efl/ewk/ewk_cookies.h:46
>  struct _Ewk_Cookie {

We need to document that the strings are stringshared to that the clients know they don't need to use strdup().
Comment 6 Gyuyoung Kim 2012-07-25 01:30:45 PDT
Comment on attachment 154271 [details]
Patch

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

>> Source/WebKit/efl/ChangeLog:8
>> +        Eina of EFL libraries supports a string functionality like strdup. So, EFL port needs
> 
> "like eina stringsharing"

I don't understand this comment well. Do you mean "like eina stringsharing" instead of "like strdup" ?
Comment 7 Gyuyoung Kim 2012-07-25 02:11:36 PDT
Created attachment 154299 [details]
Patch
Comment 8 Gyuyoung Kim 2012-07-25 02:17:00 PDT
Ok, patch is updated.
Comment 9 Chris Dumez 2012-07-25 02:28:26 PDT
(In reply to comment #6)
> (From update of attachment 154271 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=154271&action=review
> 
> >> Source/WebKit/efl/ChangeLog:8
> >> +        Eina of EFL libraries supports a string functionality like strdup. So, EFL port needs
> > 
> > "like eina stringsharing"
> 
> I don't understand this comment well. Do you mean "like eina stringsharing" instead of "like strdup" ?

I apparently misunderstood the sentence but I see you reformulated it in your last patch and now it is more easily understandable, thanks.

LGTM now.
Comment 10 Gyuyoung Kim 2012-07-25 04:27:03 PDT
Created attachment 154324 [details]
Patch
Comment 11 Kentaro Hara 2012-07-25 04:31:02 PDT
Comment on attachment 154324 [details]
Patch

Looks OK
Comment 12 WebKit Review Bot 2012-07-25 04:47:18 PDT
Comment on attachment 154324 [details]
Patch

Clearing flags on attachment: 154324

Committed r123604: <http://trac.webkit.org/changeset/123604>
Comment 13 WebKit Review Bot 2012-07-25 04:47:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Chris Dumez 2012-07-26 01:23:37 PDT
This patch apparently causes webintents/web-intents-obj-constructor.html to crash on EFL port.
Comment 15 Gyuyoung Kim 2012-07-26 01:31:56 PDT
(In reply to comment #14)
> This patch apparently causes webintents/web-intents-obj-constructor.html to crash on EFL port.

I'm sorry. I file a bug 92350 for this crash.