[M120 Migration]URL of _Ewk_Error set wrong 49/308249/3 submit/tizen/20240328.160015
authorfang fengrong <fr.fang@samsung.com>
Tue, 19 Mar 2024 08:50:47 +0000 (16:50 +0800)
committerBot Blink <blinkbot@samsung.com>
Thu, 28 Mar 2024 11:41:46 +0000 (11:41 +0000)
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 <fr.fang@samsung.com>
tizen_src/ewk/efl_integration/browser/navigation_throttle_efl.cc
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/eweb_view.h

index c571c81..a6da944 100644 (file)
@@ -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
index ef84a2c..ec314f1 100644 (file)
@@ -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: "
index 040fc89..08fc8e7 100644 (file)
@@ -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);