fix once crash issue
authorSeongjun Yim <se201.yim@samsung.com>
Fri, 19 Apr 2013 10:57:32 +0000 (19:57 +0900)
committerSeongjun Yim <se201.yim@samsung.com>
Fri, 19 Apr 2013 12:03:44 +0000 (21:03 +0900)
Change-Id: I0e6ab63e52b288fb9fd44e3d807e71b767a808e3
Signed-off-by: Seongjun Yim <se201.yim@samsung.com>
src/controls/FWebCtrl_CertificateConfirmPopup.cpp
src/controls/FWebCtrl_WebImpl.cpp

index a2f0b31..4f8aba9 100755 (executable)
@@ -103,11 +103,11 @@ _CertificateConfirmPopup::Construct(_CertificatePopupMode certPopupMode, Ewk_Cer
                rect.width = pPopupData->labelDim.width;
 
                idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_ALLOW)));
-               //idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_VIEW)));
+               idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_VIEW)));
                idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_CANCEL)));
 
                titleList.Add(*(new String(L"Allow")));
-               //titleList.Add(*(new String(L"View")));
+               titleList.Add(*(new String(L"View")));
                titleList.Add(*(new String(L"Cancel")));
        }
 
index 89a71d5..8dd7eaa 100755 (executable)
@@ -2448,16 +2448,17 @@ _WebImpl::EvaluateJavascriptN(const String& scriptCode) const
                std::unique_ptr<char[]> pScript(_StringConverter::CopyToCharArrayN(scriptCode));
                SysTryReturn(NID_WEB_CTRL, pScript.get(), null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
 
-               _WebPresenter presenter;
-               presenter.InitAsyncProcess();
+               std::unique_ptr<_WebPresenter> pPresenter(new (std::nothrow) _WebPresenter());
+               SysTryReturn(NID_WEB_CTRL, pPresenter.get(), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+               pPresenter->InitAsyncProcess();
 
-               ewk_view_script_execute(__pWebCore->GetWebNativeNode(), pScript.get(), OnScriptExecuted, &presenter);
+               ewk_view_script_execute(__pWebCore->GetWebNativeNode(), pScript.get(), OnScriptExecuted, pPresenter.get());
 
-               Tizen::Base::String* pResult = new (std::nothrow) Tizen::Base::String(L"");
-               SysTryReturn(NID_WEB_CTRL, pResult, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
-               presenter.WaitAsyncProcess(*pResult);
+               std::unique_ptr<String> pResult(new (std::nothrow) String(L""));
+               SysTryReturn(NID_WEB_CTRL, pResult.get(), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+               pPresenter->WaitAsyncProcess(*pResult.get());
 
-               return pResult;
+               return pResult.release();
        }
 
        return null;