[Webkit-unassigned] [Bug 63608] [EFL][WK2] Add ModuleEfl.cpp
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 12 01:10:58 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=63608
--- Comment #10 from Ryuan Choi <ryuan.choi at samsung.com> 2012-01-12 01:10:58 PST ---
(In reply to comment #9)
> (From update of attachment 121985 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=121985&action=review
>
> > Source/WebKit2/Platform/efl/ModuleEfl.cpp:33
> > + m_module = eina_module_new(m_path.utf8().data());
> > + if (m_module && eina_module_load(m_module))
> > + return true;
> > +
> > + return false;
>
> If eina_module_load() fails, don't you need to call eina_module_free() before returning false?
>
You are right.
I checked eina_module, so your point looks correct.
And also, nobody calls eina_module_free.
> > Source/WebKit2/Platform/efl/ModuleEfl.cpp:41
> > + if (m_module) {
> > + eina_module_unload(m_module);
> > + m_module = 0;
> > + }
>
> Is it safe to call eina_module_unload() here if m_module is non-null, but eina_module_load() failed in Module::load()?
>
> > Source/WebKit2/Platform/efl/ModuleEfl.cpp:47
> > + if (m_module)
> > + return eina_module_symbol_get(m_module, functionName);
>
> Is it safe to call eina_module_symbol_get() here if m_module is non-null, but eina_module_load() failed in Module::load()?
It is safe because eina_module_symbol_get take care of it.
However, we'd better to make it clear in this patch.
--
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