From: Seongjun Yim Date: Fri, 19 Apr 2013 10:57:32 +0000 (+0900) Subject: fix once crash issue X-Git-Tag: 2.1b_release~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95cd2df97aac006d06b9e1a368df028b871fc7f5;p=framework%2Fosp%2Fweb.git fix once crash issue Change-Id: I0e6ab63e52b288fb9fd44e3d807e71b767a808e3 Signed-off-by: Seongjun Yim --- diff --git a/src/controls/FWebCtrl_CertificateConfirmPopup.cpp b/src/controls/FWebCtrl_CertificateConfirmPopup.cpp index a2f0b31..4f8aba9 100755 --- a/src/controls/FWebCtrl_CertificateConfirmPopup.cpp +++ b/src/controls/FWebCtrl_CertificateConfirmPopup.cpp @@ -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"))); } diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index 89a71d5..8dd7eaa 100755 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -2448,16 +2448,17 @@ _WebImpl::EvaluateJavascriptN(const String& scriptCode) const std::unique_ptr 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 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;