Avoid ecore_evas_* calls in RefreshClipboard for Chrome 48/317448/6
authorRohit Kumar <rohit.16@partner.samsung.com>
Tue, 10 Sep 2024 10:01:33 +0000 (15:31 +0530)
committerBot Blink <blinkbot@samsung.com>
Tue, 10 Sep 2024 11:51:21 +0000 (11:51 +0000)
This commit addresses the issue where Chrome crashes
during the installation and launch of the YouTube app.

Testing:
- Verified that Chrome no longer crashes during the
  installation
  and launch of the YouTube app.
- Ensured that all other Chrome functionalities remain
  unaffected by the changes.
- Ran regression tests to confirm that no new issues were
  introduced.

Change-Id: Ieca0ae09fe6106674de2a78d909ec5be1338c84f
Signed-off-by: Rohit Kumar <rohit.16@partner.samsung.com>
tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl_ee.cc

index 2f112803f567bcfba75bd997882e09c69d426d80..eee43f9fe04d9dcb94a22830b70624e04563e832 100644 (file)
@@ -10,6 +10,8 @@
 #include <eina_slice.h>
 
 #include "base/base64.h"
+#include "base/base_switches.h"
+#include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/strings/escape.h"
@@ -202,6 +204,14 @@ bool ClipboardHelperEflEE::RetrieveClipboardItem(
 
 void ClipboardHelperEflEE::RefreshClipboard() {
   LOG(INFO) << "[CLIPBOARD] RefreshClipboard!";
+  /*TO DO: Need to revisit ecore_evas_selection_exists() and
+  ecore_evas_selection_get(), as there were crashes observed
+  with the calls*/
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+                                switches::kEnableChrome)) {
+      return;
+  }
+
   if (!ee_) {
     LOG(ERROR) << "[CLIPBOARD] ClipboardHelperEflEE::RefreshClipboard "
                   "ecore_evas_selection_get with NULL widget";