Fixed launch fail issue
authorJihoon Chung <jihoon.chung@samsung.com>
Mon, 14 Jan 2013 08:59:02 +0000 (17:59 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Mon, 14 Jan 2013 09:04:55 +0000 (18:04 +0900)
[Issue#] N/A
[Problem] Crash is occurred during launching
[Cause] Code is touched uninitialize value memory
[Solution] Fixed issue by changed initialize step to in front of
used point
[SCMRequest] N/A

Change-Id: Ic1a01ebd88e0c72b1bbd1b38119ef7df52ffd8ec

src/view/webkit/view_logic.cpp

index bac9fc4..024e05f 100644 (file)
@@ -480,17 +480,6 @@ void ViewLogic::initializeEwkContext(Ewk_Context* newEwkContext)
         didStartDownloadCallback,
         this);
 
-    // memory saving mode
-    int result;
-    vconf_get_int(
-        WrtDB::VconfConfig::GetVconfKeyMemorySavingMode(
-            m_model->TizenId).c_str(),
-        &result);
-    ewk_context_memory_saving_mode_set(
-        newEwkContext,
-        static_cast<WrtDB::SettingsType>(result) ==
-            WrtDB::SETTINGS_TYPE_ON ? EINA_TRUE : EINA_FALSE);
-
     // set to member value
     m_ewkContext = newEwkContext;
 }
@@ -512,6 +501,16 @@ void ViewLogic::initializeSupport()
     WrtDB::WidgetDAOReadOnly dao(m_model->TizenId);
     ewk_context_web_storage_path_set(m_ewkContext,
                                      dao.getPrivateLocalStoragePath().c_str());
+    // memory saving mode
+    int result;
+    vconf_get_int(
+        WrtDB::VconfConfig::GetVconfKeyMemorySavingMode(
+            m_model->TizenId).c_str(),
+        &result);
+    ewk_context_memory_saving_mode_set(
+        m_ewkContext,
+        static_cast<WrtDB::SettingsType>(result) ==
+            WrtDB::SETTINGS_TYPE_ON ? EINA_TRUE : EINA_FALSE);
     m_schemeSupport.reset(new SchemeSupport(m_model->Type.Get().appType));
     ViewModule::StorageSupport::initializeStorage(m_model);
     m_appsSupport->initialize(m_model);