[Webkit-unassigned] [Bug 74921] [EFL] Add new commands for Ewk_Editor_Command.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 2 20:16:19 PDT 2012


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





--- Comment #25 from Raphael Kubo da Costa (rakuco) <rakuco at webkit.org>  2012-05-02 20:16:19 PST ---
(In reply to comment #21)
> (From update of attachment 139008 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=139008&action=review
> 
> >> Source/WebKit/efl/ewk/ewk_view.cpp:321
> >> +    Eina_Hash* editorCommandHash;
> > 
> > I didn't understand why this was added to the private data instead of being a static variable inside _ewk_view_editor_command_string_get -- every time a new view is created a new hash will be created with the exact same data.
> 
> I had difficulties with calling eina_hash_free on static Eina_Hash inside function. I will move the hash table back to function and replace it with OwnPtr<Eina_Hash>.

Note that this approach "leaks" as much as using a static raw pointer -- even if you do call the OwnPtr destructor, it will be done at the program shutdown anyway. I guess that's why this idiom is not found elsewhere in the code base, by the way.

-- 
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