[Webkit-unassigned] [Bug 41149] [EFL] Implement downloadURL in ContextMenuClientEfl

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 5 11:29:38 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=41149





--- Comment #5 from Lucas De Marchi <lucas.demarchi at profusion.mobi>  2010-07-05 11:29:38 PST ---
(In reply to comment #4)
> WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp:72
>  +      download.url = url.string().utf8().data();
> shouldn't you copy it?

No, but this is indeed wrong.  Gyuyoung Kim, you should do as in FrameLoaderClientEfl::download(ResourceHandle*, const ResourceRequest& request, const ResourceRequest&, const ResourceResponse&). That is:

   CString url = request.url().prettyURL().utf8();
   download.url = url.data();

This way you will keep the CString object in stack until ewk_view_download_request returns. Otherwise the CString object returned by utf8() will be destroyed as soon as its .data() returns.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list