Call ewk_context_default_get in Browser::Browser
authorArnaud Renevier <a.renevier@samsung.com>
Wed, 10 Jun 2015 22:51:30 +0000 (15:51 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Currently, ubrowser crashes in desktop mode. For some reason, calling
ewk_context_default_get() prevents the crash. This is not the right fix,
but this is a workaround that would allow ubrowser to work while waiting
for a real fix.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=13032
Reviewed by: Antonio Gomes, SeungSeop Park

Change-Id: I3135c0185391641ce061c122439620401746dcfe
Signed-off-by: Arnaud Renevier <a.renevier@samsung.com>
tizen_src/ewk/ubrowser/browser.cc

index d6b2db4..f79ae9f 100644 (file)
@@ -28,6 +28,12 @@ Browser::Browser(bool desktop)
   , tracing_enabled_(false) {
 
   log_info("UI type: %s", desktop_ ? "desktop" : "mobile");
+
+  // If we don't call ewk_context_default_get here, ubrowser crashes in desktop
+  // mode. This is a hack.
+  // FIXME: find a real fix
+  Ewk_Context* ctx = ewk_context_default_get();
+
   if (desktop_)
     return;
 
@@ -67,7 +73,6 @@ Browser::Browser(bool desktop)
   evas_object_smart_callback_add(toolbox_window_, "delete,request",
       &Browser::OnToolboxWindowDelRequest, this);
 
-  Ewk_Context* ctx = ewk_context_default_get();
   ewk_context_vibration_client_callbacks_set(ctx,
                                              &Browser::OnVibrationStart,
                                              &Browser::OnVibrationStop,