Changeset 129863 in webkit
- Timestamp:
- Sep 28, 2012 1:56:55 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r129862 r129863 1 2012-09-28 Eunmi Lee <eunmi15.lee@samsung.com> 2 3 [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries. 4 https://bugs.webkit.org/show_bug.cgi?id=97173 5 6 Reviewed by Gyuyoung Kim. 7 8 Remove codes to initialize and shutdown the EFL libraries from 9 RunLoopEfl.cpp. Initialization and shutdown will be done in the 10 ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web 11 process. 12 13 No new tests. This patch doesn't change behavior. 14 15 * platform/efl/RunLoopEfl.cpp: 16 (WebCore::RunLoop::RunLoop): 17 (WebCore::RunLoop::~RunLoop): 18 1 19 2012-09-19 Vsevolod Vlasov <vsevik@chromium.org> 2 20 -
trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp
r112353 r129863 29 29 30 30 #include <Ecore.h> 31 #include <Ecore_Evas.h>32 #include <Ecore_File.h>33 #include <Edje.h>34 31 #include <wtf/OwnPtr.h> 35 32 #include <wtf/PassOwnPtr.h> … … 43 40 : m_initEfl(false) 44 41 { 45 if (!ecore_init()) {46 LOG_ERROR("could not init ecore.");47 return;48 }49 50 if (!ecore_evas_init()) {51 LOG_ERROR("could not init ecore_evas.");52 goto errorEcoreEvas;53 }54 55 if (!ecore_file_init()) {56 LOG_ERROR("could not init ecore_file.");57 goto errorEcoreFile;58 }59 60 if (!edje_init()) {61 LOG_ERROR("could not init edje.");62 goto errorEdje;63 }64 65 42 m_pipe = adoptPtr(ecore_pipe_add(wakeUpEvent, this)); 66 43 m_initEfl = true; 67 68 return;69 70 errorEdje:71 ecore_file_shutdown();72 errorEcoreFile:73 ecore_evas_shutdown();74 errorEcoreEvas:75 ecore_shutdown();76 44 } 77 45 78 46 RunLoop::~RunLoop() 79 47 { 80 if (m_initEfl) {81 edje_shutdown();82 ecore_file_shutdown();83 ecore_evas_shutdown();84 ecore_shutdown();85 }86 48 } 87 49 -
trunk/Source/WebKit2/ChangeLog
r129810 r129863 1 2012-09-28 Eunmi Lee <eunmi15.lee@samsung.com> 2 3 [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries. 4 https://bugs.webkit.org/show_bug.cgi?id=97173 5 6 Reviewed by Gyuyoung Kim. 7 8 Initialize and shutdown the EFL libraries in the ewk_main.cpp for ui 9 process and WebProcessMainEfl.cpp for web process. 10 Additionally, initialization and shutdown are done when ewk_context is 11 created and deleted, so ewk_{init,shutdown} APIs are changed to 12 internal function and applications don't have to call them. 13 14 * PlatformEfl.cmake: 15 * UIProcess/API/efl/EWebKit2.h: 16 * UIProcess/API/efl/ewk_context.cpp: 17 (_Ewk_Context::_Ewk_Context): 18 (_Ewk_Context::~_Ewk_Context): 19 * UIProcess/API/efl/ewk_main.cpp: 20 (ewk_init): 21 (ewk_shutdown): 22 * UIProcess/API/efl/ewk_main.h: Removed. 23 * UIProcess/API/efl/ewk_main_private.h: Added. 24 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: 25 (EWK2UnitTest::EWK2UnitTestBase::SetUp): 26 (EWK2UnitTest::EWK2UnitTestBase::TearDown): 27 * WebProcess/efl/WebProcessMainEfl.cpp: 28 (WebKit::WebProcessMainEfl): 29 1 30 2012-09-27 Beth Dakin <bdakin@apple.com> 2 31 -
trunk/Source/WebKit2/PlatformEfl.cmake
r129451 r129863 221 221 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent.h" 222 222 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_intent_service.h" 223 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_main.h"224 223 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_navigation_policy_decision.h" 225 224 "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_popup_menu_item.h" -
trunk/Source/WebKit2/UIProcess/API/efl/EWebKit2.h
r129196 r129863 37 37 #include "ewk_intent.h" 38 38 #include "ewk_intent_service.h" 39 #include "ewk_main.h"40 39 #include "ewk_navigation_policy_decision.h" 41 40 #include "ewk_popup_menu_item.h" -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
r129134 r129863 36 36 #include "ewk_download_job.h" 37 37 #include "ewk_download_job_private.h" 38 #include "ewk_main_private.h" 38 39 #include <WebCore/FileSystem.h> 39 40 #include <wtf/HashMap.h> … … 82 83 , requestManager(WKContextGetSoupRequestManager(contextRef.get())) 83 84 { 85 ewk_init(); 86 84 87 #if ENABLE(BATTERY_STATUS) 85 88 WKBatteryManagerRef wkBatteryManager = WKContextGetBatteryManager(contextRef.get()); … … 115 118 for ( ; it != end; ++it) 116 119 ewk_download_job_unref(it->second); 120 121 ewk_shutdown(); 117 122 } 118 123 }; -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_main.cpp
r129101 r129863 21 21 22 22 #include "config.h" 23 #include "ewk_main.h"24 23 25 24 #include "ewk_private.h" … … 40 39 int _ewk_log_dom = -1; 41 40 41 /** 42 * @internal 43 * Initializes WebKit's instance. 44 * - initializes components needed by EFL, 45 * - increases a reference count of WebKit's instance. 46 * Returns a reference count of WebKit's instance on success or 0 on failure 47 */ 42 48 int ewk_init(void) 43 49 { … … 69 75 } 70 76 77 if (!edje_init()) { 78 CRITICAL("could not init edje."); 79 goto error_edje; 80 } 81 71 82 g_type_init(); 72 83 … … 78 89 return ++_ewkInitCount; 79 90 91 error_edje: 92 ecore_evas_shutdown(); 80 93 error_ecore_evas: 81 94 ecore_shutdown(); … … 91 104 } 92 105 106 /** 107 * @internal 108 * Decreases a reference count of WebKit's instance, possibly destroying it. 109 * If the reference count reaches 0, WebKit's instance is destroyed. 110 * Returns a reference count of WebKit's instance 111 */ 93 112 int ewk_shutdown(void) 94 113 { … … 96 115 return _ewkInitCount; 97 116 117 edje_shutdown(); 98 118 ecore_evas_shutdown(); 99 119 ecore_shutdown(); -
trunk/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp
r129765 r129863 46 46 void EWK2UnitTestBase::SetUp() 47 47 { 48 ewk_init();48 ASSERT_GT(ecore_evas_init(), 0); 49 49 50 50 unsigned int width = environment->defaultWidth(); … … 72 72 evas_object_del(m_webView); 73 73 ecore_evas_free(m_ecoreEvas); 74 e wk_shutdown();74 ecore_evas_shutdown(); 75 75 } 76 76 -
trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp
r129541 r129863 32 32 #include "WKBase.h" 33 33 #include <Ecore.h> 34 #include <Ecore_Evas.h> 35 #include <Edje.h> 34 36 #include <Efreet.h> 35 37 #include <WebCore/ResourceHandle.h> … … 61 63 if (!ecore_init()) { 62 64 // Could not init ecore. 65 eina_shutdown(); 66 return 1; 67 } 68 69 if (!ecore_evas_init()) { 70 ecore_shutdown(); 71 eina_shutdown(); 72 return 1; 73 } 74 75 if (!edje_init()) { 76 ecore_evas_shutdown(); 77 ecore_shutdown(); 63 78 eina_shutdown(); 64 79 return 1; … … 106 121 g_object_unref(soupCache); 107 122 123 edje_shutdown(); 124 ecore_evas_shutdown(); 125 ecore_shutdown(); 126 eina_shutdown(); 127 108 128 return 0; 109 129 -
trunk/Tools/ChangeLog
r129826 r129863 1 2012-09-28 Eunmi Lee <eunmi15.lee@samsung.com> 2 3 [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries. 4 https://bugs.webkit.org/show_bug.cgi?id=97173 5 6 Reviewed by Gyuyoung Kim. 7 8 The initialization and shutdown are done inside the webkit, so we don't 9 have to call them out of the webkit. 10 11 * MiniBrowser/efl/main.c: 12 (quit): 13 (main): 14 * WebKitTestRunner/efl/PlatformWebViewEfl.cpp: 15 (WTR::initEcoreEvas): 16 (WTR::PlatformWebView::~PlatformWebView): 17 * WebKitTestRunner/efl/main.cpp: 18 (main): 19 1 20 2012-09-27 Alexandre Elias <aelias@chromium.org> 2 21 -
trunk/Tools/MiniBrowser/efl/main.c
r128876 r129863 201 201 quit(Eina_Bool success, const char *msg) 202 202 { 203 e wk_shutdown();203 ecore_evas_shutdown(); 204 204 205 205 if (msg) … … 269 269 }; 270 270 271 if (!e wk_init())271 if (!ecore_evas_init()) 272 272 return EXIT_FAILURE; 273 273 -
trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
r127793 r129863 33 33 static Ecore_Evas* initEcoreEvas() 34 34 { 35 if (!ecore_evas_init()) 36 return 0; 37 35 38 Ecore_Evas* ecoreEvas = useX11Window ? ecore_evas_new(0, 0, 0, 800, 600, 0) : ecore_evas_buffer_new(800, 600); 36 39 if (!ecoreEvas) … … 58 61 evas_object_del(m_view); 59 62 ecore_evas_free(m_window); 63 ecore_evas_shutdown(); 60 64 } 61 65 -
trunk/Tools/WebKitTestRunner/efl/main.cpp
r124445 r129863 33 33 WTFInstallReportBacktraceOnCrashHook(); 34 34 35 if (!ewk_init())36 return 1;37 38 35 #ifdef HAVE_ECORE_X 39 36 const char* display = getenv("DISPLAY"); 40 int in tialized = 0;37 int initialized = 0; 41 38 if (display) { 42 intialized = ecore_x_init(0); 43 if (!intialized) { 44 ewk_shutdown(); 39 initialized = ecore_x_init(0); 40 if (!initialized) 45 41 return 1; 46 }47 42 } 48 43 #endif … … 52 47 53 48 #ifdef HAVE_ECORE_X 54 if (in tialized)49 if (initialized) 55 50 ecore_x_shutdown(); 56 51 #endif 57 58 ewk_shutdown();59 52 60 53 return 0;
Note: See TracChangeset
for help on using the changeset viewer.