[Webkit-unassigned] [Bug 61423] [EFL] Eina_List out of memory handling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 26 09:17:11 PDT 2011


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





--- Comment #7 from Raphael Kubo da Costa <kubo at profusion.mobi>  2011-05-26 09:17:11 PST ---
(In reply to comment #6)
> Thanks for review. Sounds reasonably to separate OOM handling for each function. What will you say of following scenario:
> 
> func() {
> 
>    eina_list_append();
>    if (eina_error_get())
>       goto out_of_memory_handling_func;
> 
> // Out of memory handling for func()
> out_of_memory_handling_func:
>     CRITICAL("%s", eina_error_msg_get(eina_error_get()));
>     void* _tmp_data;
>     EINA_LIST_FREE(list, _tmp_data)
>        method_for_free_item(_tmp_data) // like ewk_cookies_free(_tmp_data), ewk_context_menu_item_free(_tmp_data)
>     return ;
> }
> 
> A similar solution was proposed in html saving feature for OOM (bug id: 55455)

That sounds better, indeed. Personally, I'd simply ignore errors which come from eina_list_append (or treat them all, which is infeasible), eina_list_append should not error out very often. Do you have some sort of setup which makes it fail more frequently than usual?

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