[M126 Migration][Chrome] Fix for crash during scroll 68/319368/3
authorChandan Padhi <c.padhi@samsung.com>
Thu, 2 May 2024 05:37:59 +0000 (11:07 +0530)
committerBot Blink <blinkbot@samsung.com>
Tue, 22 Oct 2024 23:54:23 +0000 (23:54 +0000)
WebContentsViewAuraHelperEfl is not instantiated for Chrome
that results in crash while dereferencing |wcva_helper()|.

This commit adds null checks for |wcva_helper()| in
RWHVAuraCommonHelperEfl.

Reference: https://review.tizen.org/gerrit/310575/

Change-Id: Ie596acd81654eb9e9fc1610bc48fa4d888293c2b
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
(cherry picked from commit 0124946763fd3f58117cbe43e9bf87850eaa1b45)

tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.cc

index ca2b17427dbbc98601d06a2efaca8543e0ccb1dc..47595a923c8bd20ce8d22856906c6dc869d2db26 100644 (file)
@@ -183,7 +183,9 @@ void RWHVAuraCommonHelperEfl::OnSelectionRectReceived(
     WebContentsImpl* wc = static_cast<WebContentsImpl*>(web_contents_);
     WebContentsViewAura* wcva =
         static_cast<WebContentsViewAura*>(wc->GetView());
-    wcva->wcva_helper()->OnSelectionRectReceived(selection_rect);
+    if (wcva->wcva_helper()) {
+      wcva->wcva_helper()->OnSelectionRectReceived(selection_rect);
+    }
   }
 }
 
@@ -627,8 +629,10 @@ void RWHVAuraCommonHelperEfl::DidOverscroll(
     WebContentsImpl* wc = static_cast<WebContentsImpl*>(web_contents_);
     WebContentsViewAura* wcva =
         static_cast<WebContentsViewAura*>(wc->GetView());
-    wcva->wcva_helper()->OnOverscrolled(params.accumulated_overscroll,
-                                        params.latest_overscroll_delta);
+    if (wcva->wcva_helper()) {
+      wcva->wcva_helper()->OnOverscrolled(params.accumulated_overscroll,
+                                          params.latest_overscroll_delta);
+    }
   }
 }