Title: [142087] trunk/Source
Revision
142087
Author
rak...@webkit.org
Date
2013-02-07 03:01:31 -0800 (Thu, 07 Feb 2013)

Log Message

[EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
https://bugs.webkit.org/show_bug.cgi?id=97173

Reviewed by Kenneth Rohde Christiansen, signed-off by Benjamin Poulain.

Source/WebCore:

Remove codes to initialize and shutdown the EFL libraries from
RunLoopEfl.cpp. Initialization and shutdown will be done in the
ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
process.

No new tests. This patch doesn't change behavior.

* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::~RunLoop):

Source/WebKit2:

Initialize and shutdown the EFL libraries in the ewk_main.cpp for
UIProcess and WebProcessMainEfl.cpp for WebProcess.

This allows us to shut down the libraries in a proper way, since
RunLoop persist until the process exits.

* UIProcess/API/efl/ewk_main.cpp:
(ewk_init):
(ewk_shutdown):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (142086 => 142087)


--- trunk/Source/WebCore/ChangeLog	2013-02-07 10:05:43 UTC (rev 142086)
+++ trunk/Source/WebCore/ChangeLog	2013-02-07 11:01:31 UTC (rev 142087)
@@ -1,3 +1,21 @@
+2013-02-05  Eunmi Lee  <eunmi15....@samsung.com> and Raphael Kubo da Costa  <raphael.kubo.da.co...@intel.com>
+
+        [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
+        https://bugs.webkit.org/show_bug.cgi?id=97173
+
+        Reviewed by Kenneth Rohde Christiansen, signed-off by Benjamin Poulain.
+
+        Remove codes to initialize and shutdown the EFL libraries from
+        RunLoopEfl.cpp. Initialization and shutdown will be done in the
+        ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
+        process.
+
+        No new tests. This patch doesn't change behavior.
+
+        * platform/efl/RunLoopEfl.cpp:
+        (WebCore::RunLoop::RunLoop):
+        (WebCore::RunLoop::~RunLoop):
+
 2013-02-07  Ilya Tikhonovsky  <loi...@chromium.org>
 
         Unreviewed fix for inspector tests in debug.

Modified: trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp (142086 => 142087)


--- trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp	2013-02-07 10:05:43 UTC (rev 142086)
+++ trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp	2013-02-07 11:01:31 UTC (rev 142087)
@@ -28,9 +28,6 @@
 #include "RunLoop.h"
 
 #include <Ecore.h>
-#include <Ecore_Evas.h>
-#include <Ecore_File.h>
-#include <Edje.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 
@@ -43,47 +40,12 @@
     : m_initEfl(false)
     , m_wakeUpEventRequested(false)
 {
-    if (!ecore_init()) {
-        LOG_ERROR("could not init ecore.");
-        return;
-    }
-
-    if (!ecore_evas_init()) {
-        LOG_ERROR("could not init ecore_evas.");
-        goto errorEcoreEvas;
-    }
-
-    if (!ecore_file_init()) {
-        LOG_ERROR("could not init ecore_file.");
-        goto errorEcoreFile;
-    }
-
-    if (!edje_init()) {
-        LOG_ERROR("could not init edje.");
-        goto errorEdje;
-    }
-
     m_pipe = adoptPtr(ecore_pipe_add(wakeUpEvent, this));
     m_initEfl = true;
-
-    return;
-
-errorEdje:
-    ecore_file_shutdown();
-errorEcoreFile:
-    ecore_evas_shutdown();
-errorEcoreEvas:
-    ecore_shutdown();
 }
 
 RunLoop::~RunLoop()
 {
-    if (m_initEfl) {
-        edje_shutdown();
-        ecore_file_shutdown();
-        ecore_evas_shutdown();
-        ecore_shutdown();
-    }
 }
 
 void RunLoop::run()

Modified: trunk/Source/WebKit2/ChangeLog (142086 => 142087)


--- trunk/Source/WebKit2/ChangeLog	2013-02-07 10:05:43 UTC (rev 142086)
+++ trunk/Source/WebKit2/ChangeLog	2013-02-07 11:01:31 UTC (rev 142087)
@@ -1,3 +1,22 @@
+2013-02-05  Eunmi Lee  <eunmi15....@samsung.com> and Raphael Kubo da Costa  <raphael.kubo.da.co...@intel.com>
+
+        [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
+        https://bugs.webkit.org/show_bug.cgi?id=97173
+
+        Reviewed by Kenneth Rohde Christiansen, signed-off by Benjamin Poulain.
+
+        Initialize and shutdown the EFL libraries in the ewk_main.cpp for
+        UIProcess and WebProcessMainEfl.cpp for WebProcess.
+
+        This allows us to shut down the libraries in a proper way, since
+        RunLoop persist until the process exits.
+
+        * UIProcess/API/efl/ewk_main.cpp:
+        (ewk_init):
+        (ewk_shutdown):
+        * WebProcess/efl/WebProcessMainEfl.cpp:
+        (WebKit::WebProcessMainEfl):
+
 2013-02-07  Gyuyoung Kim  <gyuyoung....@samsung.com>
 
         Unreviewed build fix.

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_main.cpp (142086 => 142087)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_main.cpp	2013-02-07 10:05:43 UTC (rev 142086)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_main.cpp	2013-02-07 11:01:31 UTC (rev 142087)
@@ -85,6 +85,11 @@
     }
 #endif
 
+    if (!edje_init()) {
+        CRITICAL("Could not init edje.");
+        goto error_edje;
+    }
+
 #if !GLIB_CHECK_VERSION(2, 35, 0)
     g_type_init();
 #endif
@@ -96,8 +101,11 @@
 
     return ++_ewkInitCount;
 
+error_edje:
 #ifdef HAVE_ECORE_X
+    ecore_x_shutdown();
 error_ecore_x:
+#else
     ecore_imf_shutdown();
 #endif
 error_ecore_imf:
@@ -120,6 +128,7 @@
     if (--_ewkInitCount)
         return _ewkInitCount;
 
+    edje_shutdown();
 #ifdef HAVE_ECORE_X
     ecore_x_shutdown();
 #endif

Modified: trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp (142086 => 142087)


--- trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp	2013-02-07 10:05:43 UTC (rev 142086)
+++ trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp	2013-02-07 11:01:31 UTC (rev 142087)
@@ -31,6 +31,8 @@
 #include "ProxyResolverSoup.h"
 #include "WKBase.h"
 #include <Ecore.h>
+#include <Ecore_Evas.h>
+#include <Edje.h>
 #include <Efreet.h>
 #include <WebCore/AuthenticationChallenge.h>
 #include <WebCore/NetworkingContext.h>
@@ -87,6 +89,25 @@
     }
 #endif
 
+    if (!ecore_evas_init()) {
+#ifdef HAVE_ECORE_X
+        ecore_x_shutdown();
+#endif
+        ecore_shutdown();
+        eina_shutdown();
+        return 1;
+    }
+
+    if (!edje_init()) {
+        ecore_evas_shutdown();
+#ifdef HAVE_ECORE_X
+        ecore_x_shutdown();
+#endif
+        ecore_shutdown();
+        eina_shutdown();
+        return 1;
+    }
+
 #if !GLIB_CHECK_VERSION(2, 35, 0)
     g_type_init();
 #endif
@@ -127,6 +148,8 @@
     soup_cache_dump(soupCache);
     g_object_unref(soupCache);
 
+    edje_shutdown();
+    ecore_evas_shutdown();
     ecore_x_shutdown();
     ecore_shutdown();
     eina_shutdown();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to