fix build error and prevent issues
authorSeongjun Yim <se201.yim@samsung.com>
Sat, 13 Apr 2013 07:24:16 +0000 (16:24 +0900)
committerSeongjun Yim <se201.yim@samsung.com>
Sat, 13 Apr 2013 08:56:40 +0000 (17:56 +0900)
Change-Id: I1e362eb682077c468c03bc4d9b1f666e320dc24b
Signed-off-by: Seongjun Yim <se201.yim@samsung.com>
src/controls/FWebCtrlGeolocationPermissionManager.cpp
src/controls/FWebCtrlWebStorageManager.cpp
src/controls/FWebCtrl_WebMaker.cpp
src/controls/FWebCtrl_WebStorageManagerImpl.cpp

index 80803ca..d30dc34 100755 (executable)
@@ -50,6 +50,8 @@ GeolocationPermissionManager::GeolocationPermissionManager(void)
 
 GeolocationPermissionManager::~GeolocationPermissionManager(void)
 {
+       delete __pGeolocationPermissionManagerImpl;
+       __pGeolocationPermissionManagerImpl = null;
 }
 
 
index 201000d..c0d43af 100755 (executable)
@@ -54,6 +54,7 @@ WebStorageManager::WebStorageManager(void)
 WebStorageManager::~WebStorageManager(void)
 {
        delete __pWebStorageManagerImpl;
+       __pWebStorageManagerImpl = null;
 }
 
 
index 8976de2..4febbee 100755 (executable)
@@ -31,6 +31,7 @@
 #include <FUi_CoordinateSystemUtils.h>
 
 
+using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
@@ -65,9 +66,7 @@ protected:
                _UiBuilderControlLayout* pControlProperty = null;
                
                WebSetting setting;
-               Tizen::Base::String elementString;
-               //bool ret = false;
-               //ApiVersion apiVersion = getApiVersion();
+               String elementString;
 
                Rectangle webRect;
 
@@ -78,20 +77,6 @@ protected:
                SysTryReturn(NID_WEB_CTRL, pWeb.get(), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed", GetErrorMessage(E_OUT_OF_MEMORY));
 
                webRect = pControlProperty->GetRect();
-
-               // Construct
-               /*if( apiVersion >= V2_0)
-               {
-                   ret = PrivilegeManager_checkPrivileges(&e, 1, PRV_WEB_SERVICE);
-
-
-                   if( ret == false)
-                   {
-                       SetLastResult(E_PRIVILEGE_DENIED);
-                       return null;
-                   }
-               }*/
-
                r = pWeb->Construct(webRect);
                SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] A system error has been occurred. Web Control is not constructed.", GetErrorMessage(E_SYSTEM));
 
@@ -109,9 +94,8 @@ protected:
 
                if (pControl->GetElement(L"fontSize", elementString) || pControl->GetElement(L"FontSize", elementString))
                {
-                       int fontSize;
-                       fontSize= _CoordinateSystemUtils::ConvertToFloat(elementString);
-                       setting.SetFontSize(fontSize);
+                       float fontSize = _CoordinateSystemUtils::ConvertToFloat(elementString);
+                       setting.SetFontSize(static_cast< int >(fontSize));
                }
 
                if (pControl->GetElement(L"defaultTextEncoding", elementString) || pControl->GetElement(L"DefaultTextEncoding", elementString))
index b16f2de..97292aa 100755 (executable)
@@ -331,6 +331,8 @@ _WebStorageManagerImpl::CompareOrigin(WebStorageType storageType, const String&
        for(; pOriginList; pOriginList = eina_list_next(pOriginList))
        {
                Ewk_Security_Origin* pOrigin = static_cast<Ewk_Security_Origin*>(eina_list_data_get(pOriginList));
+               SysTryReturn(NID_WEB_CTRL, pOrigin, null, E_INVALID_ARG, "[%s] This origin does not exist.", GetErrorMessage(E_INVALID_ARG));
+
                int cmp = origin.CompareTo(_Utility::CreateOrigin(pOrigin));
 
                if (cmp ==0)