fixes crash in utc_blink_ewk_view_javascript_confirm_reply_func test
authorArnaud Renevier <a.renevier@samsung.com>
Mon, 23 Nov 2015 20:15:19 +0000 (12:15 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
When calling ewk_view_javascript_confirm_reply, the close dialog
callback is executed. But if returning false from
ewk_view_javascript_confirm_callback_set, the close dialog callback is
also executed.

So, we need to return EINA_TRUE from confirmCallback; otherwise, the
close dialog callback is executed twice, which leads to a crash.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=6980

Reviewed by: a1.gomes, g.czajkowski

Change-Id: I7a7300161a52e5180ae52f82301d478d203a2cdd
Signed-off-by: Arnaud Renevier <a.renevier@samsung.com>
tizen_src/ewk/unittest/utc_blink_ewk_view_javascript_confirm_reply_func.cpp

index f62011a..34821df 100755 (executable)
@@ -16,8 +16,8 @@ class utc_blink_ewk_view_javascript_confirm_reply : public utc_blink_ewk_base
   /* Callback for script confirm */
   static Eina_Bool confirmCallback(Evas_Object* webview, const char* message, void* data)
   {
-    Eina_Bool result = EINA_TRUE;
-    ewk_view_javascript_confirm_reply(webview, result);
+    ewk_view_javascript_confirm_reply(webview, EINA_TRUE);
+    return EINA_TRUE;
   }
 };