From 68436ad99ea19d5477112f9872c79e2a477b09b3 Mon Sep 17 00:00:00 2001 From: fang fengrong Date: Tue, 19 Mar 2024 16:50:47 +0800 Subject: [PATCH] [M120 Migration]URL of _Ewk_Error set wrong The url should be set as the third parameter of _Ewk_Error constructor. refer: https://review.tizen.org/gerrit/#/c/297326 Change-Id: Ic0ebe2a005083749afc4e28defd6d51e2cc7e59d Signed-off-by: fang fengrong --- .../ewk/efl_integration/browser/navigation_throttle_efl.cc | 2 +- tizen_src/ewk/efl_integration/eweb_view.cc | 12 +++++------- tizen_src/ewk/efl_integration/eweb_view.h | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/tizen_src/ewk/efl_integration/browser/navigation_throttle_efl.cc b/tizen_src/ewk/efl_integration/browser/navigation_throttle_efl.cc index c571c81..a6da944 100644 --- a/tizen_src/ewk/efl_integration/browser/navigation_throttle_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/navigation_throttle_efl.cc @@ -72,7 +72,7 @@ NavigationThrottleEfl::WillFailRequest() { // from app side. if (web_view->IsLoadErrorPageCallbackSet()) { const char* error_page = web_view->InvokeViewLoadErrorPageCallback( - handle->GetURL(), error_code, "ERR_ABORTED"); + handle->GetURL(), error_code, error_code == net::ERR_ABORTED); if (error_page) { LOG(ERROR) << "Already get customer error page"; // Currently return result with action NavigationThrottle::CANCEL, error diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index ef84a2c..ec314f1 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -1331,13 +1331,11 @@ void EWebView::SetViewLoadErrorPageCallback( } // Remove below code while ewk_error_cancellation_get has been implemented. -const char* EWebView::InvokeViewLoadErrorPageCallback( - const GURL& url, - int error_code, - const std::string& error_description) { - std::unique_ptr<_Ewk_Error> err( - new _Ewk_Error(error_code, url.possibly_invalid_spec().c_str(), - error_description.c_str())); +const char* EWebView::InvokeViewLoadErrorPageCallback(const GURL& url, + int error_code, + bool is_cancellation) { + std::unique_ptr<_Ewk_Error> err(new _Ewk_Error( + error_code, is_cancellation, url.possibly_invalid_spec().c_str())); _Ewk_Error_Page error_page; LOG(INFO) << "EWebView::InvokeLoadErrorPageCallback url: " diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 040fc89..08fc8e7 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -575,10 +575,9 @@ class EWebView { void SetViewLoadErrorPageCallback(Ewk_View_Error_Page_Load_Callback callback, void* user_data); - const char* InvokeViewLoadErrorPageCallback( - const GURL& url, - int error_code, - const std::string& error_description); + const char* InvokeViewLoadErrorPageCallback(const GURL& url, + int error_code, + bool is_cancellation); bool IsLoadErrorPageCallbackSet() const; void SetViewUnfocusAllowCallback(Ewk_View_Unfocus_Allow_Callback callback, void* user_data); -- 2.7.4