Bug 117014 - [EFL][WK2] Add a null checking condition to in hide() of EwkContextMenu
Summary: [EFL][WK2] Add a null checking condition to in hide() of EwkContextMenu
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-29 20:57 PDT by Gyuyoung Kim
Modified: 2013-05-31 19:59 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.43 KB, patch)
2013-05-29 20:58 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (1.45 KB, patch)
2013-05-30 17:40 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.