[EFL] Add "return" statement corresponding to abnormal condition on _ewk_frame_smart_add.

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

Bail out when we fail to allocate an Ewk_Frame_Smart_Data object rather than continuing on as if the allocation had succeeded.

Patch by KwangHyuk Kim <hyuki.kim@samsung.com> on 2011-08-19
Reviewed by Adam Roben.

* ewk/ewk_frame.cpp:
(_ewk_frame_smart_add):

git-svn-id: svn://svn.chromium.org/blink/trunk@93410 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 47ae27d9
2011-08-19 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Add "return" statement corresponding to abnormal condition on _ewk_frame_smart_add.
https://bugs.webkit.org/show_bug.cgi?id=65408
Bail out when we fail to allocate an Ewk_Frame_Smart_Data object rather than continuing on as if the allocation had succeeded.
Reviewed by Adam Roben.
* ewk/ewk_frame.cpp:
(_ewk_frame_smart_add):
2011-08-19 KwangHyuk Kim <hyuki.kim@samsung.com> 2011-08-19 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Change condition checking logic related with both change of position and offset for backing store. [EFL] Change condition checking logic related with both change of position and offset for backing store.
......
...@@ -182,10 +182,11 @@ static void _ewk_frame_smart_add(Evas_Object *o) ...@@ -182,10 +182,11 @@ static void _ewk_frame_smart_add(Evas_Object *o)
if (!sd) { if (!sd) {
sd = (Ewk_Frame_Smart_Data*)calloc(1, sizeof(Ewk_Frame_Smart_Data)); sd = (Ewk_Frame_Smart_Data*)calloc(1, sizeof(Ewk_Frame_Smart_Data));
if (!sd) if (!sd) {
CRITICAL("could not allocate Ewk_Frame_Smart_Data"); CRITICAL("could not allocate Ewk_Frame_Smart_Data");
else return;
evas_object_smart_data_set(o, sd); }
evas_object_smart_data_set(o, sd);
} }
sd->self = o; sd->self = o;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment