Bug 100078 - [EFL][WK2] Crash when passing NULL instead of ewk_view instance
Summary: [EFL][WK2] Crash when passing NULL instead of ewk_view instance
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: Ryuan Choi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-22 23:16 PDT by Ryuan Choi
Modified: 2012-10-24 04:59 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.42 KB, patch)
2012-10-23 20:51 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff
Patch (5.48 KB, patch)
2012-10-23 20:55 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff
Patch (4.21 KB, patch)
2012-10-24 04:31 PDT, Ryuan Choi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryuan Choi 2012-10-22 23:16:40 PDT
Although it is abnormal to pass null as first argument of ewk_view_XXX(),
I think that the crash is not acceptable
because WebKit/efl has macro to check the type of smart object and return from code safely.
Comment 1 Ryuan Choi 2012-10-23 20:51:14 PDT
Created attachment 170303 [details]
Patch
Comment 2 Ryuan Choi 2012-10-23 20:55:08 PDT
Created attachment 170305 [details]
Patch
Comment 3 Raphael Kubo da Costa (:rakuco) 2012-10-24 03:41:28 PDT
Comment on attachment 170305 [details]
Patch

I'd say just return earlier in the macro if ewkView is 0. Plus it's better to create a new test "section" for this.
Comment 4 Ryuan Choi 2012-10-24 04:31:35 PDT
Created attachment 170360 [details]
Patch
Comment 5 Ryuan Choi 2012-10-24 04:34:13 PDT
(In reply to comment #3)
> (From update of attachment 170305 [details])
> I'd say just return earlier in the macro if ewkView is 0. Plus it's better to create a new test "section" for this.

Thanks,

I added break to exit from this macro and created new test.
Comment 6 Chris Dumez 2012-10-24 04:34:35 PDT
BTW, we are starting to Ewk_View refactoring to C++ via Bug 100226 so this code is going to change a lot over the next couple of days.
Comment 7 Gyuyoung Kim 2012-10-24 04:42:51 PDT
Comment on attachment 170360 [details]
Patch

It looks those patches don't touch this section yet. I think this patch can be landed first.
Comment 8 Ryuan Choi 2012-10-24 04:57:59 PDT
Committed r132336: <http://trac.webkit.org/changeset/132336>