Bug 117014

Summary: [EFL][WK2] Add a null checking condition to in hide() of EwkContextMenu
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit EFLAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, lucas.de.marchi, rakuco
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Gyuyoung Kim 2013-05-29 20:57:32 PDT
m_viewImpl is able to be null. So, we need to protect this function against such case.


EwkContextMenu::EwkContextMenu()
    : m_viewImpl(0)
    , m_contextMenuItems(0)
{
}

EwkContextMenu::EwkContextMenu(Eina_List* items)
    : m_viewImpl(0)
    , m_contextMenuItems(0)
{
Comment 1 Gyuyoung Kim 2013-05-29 20:58:35 PDT
Created attachment 203306 [details]
Patch
Comment 2 Mikhail Pozdnyakov 2013-05-30 15:22:01 PDT
Comment on attachment 203306 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_context_menu.cpp:77
> +bool EwkContextMenu::hide()

I'd not change the function semantics: returned 'false' would implicitly mean that menu is not hidden which is not the case.
Comment 3 Gyuyoung Kim 2013-05-30 17:40:58 PDT
Created attachment 203402 [details]
Patch
Comment 4 Gyuyoung Kim 2013-05-30 17:41:30 PDT
(In reply to comment #2)
> (From update of attachment 203306 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203306&action=review
> 
> > Source/WebKit2/UIProcess/API/efl/ewk_context_menu.cpp:77
> > +bool EwkContextMenu::hide()
> 
> I'd not change the function semantics: returned 'false' would implicitly mean that menu is not hidden which is not the case.

Ok, I don't have big opinion about it. Changed.
Comment 5 Mikhail Pozdnyakov 2013-05-31 07:00:48 PDT
Comment on attachment 203402 [details]
Patch

LGTM
Comment 6 Chris Dumez 2013-05-31 07:59:45 PDT
Comment on attachment 203402 [details]
Patch

r=me
Comment 7 WebKit Commit Bot 2013-05-31 19:59:02 PDT
Comment on attachment 203402 [details]
Patch

Clearing flags on attachment: 203402

Committed r151062: <http://trac.webkit.org/changeset/151062>
Comment 8 WebKit Commit Bot 2013-05-31 19:59:05 PDT
All reviewed patches have been landed.  Closing bug.