mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: cherry-pick 94af9d13a14b from chromium (#38711)
* chore: cherry-pick 94af9d13a14b from chromium * chore: update patches --------- Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
@@ -128,3 +128,4 @@ fix_x11_window_restore_minimized_maximized_window.patch
|
||||
chore_defer_usb_service_getdevices_request_until_usb_service_is.patch
|
||||
revert_x11_keep_windowcache_alive_for_a_time_interval.patch
|
||||
cherry-pick-ec53103cc72d.patch
|
||||
cherry-pick-94af9d13a14b.patch
|
||||
|
||||
35
patches/chromium/cherry-pick-94af9d13a14b.patch
Normal file
35
patches/chromium/cherry-pick-94af9d13a14b.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Pavlotsky <ivan.pavlotsky@lge.com>
|
||||
Date: Mon, 1 May 2023 07:48:23 +0000
|
||||
Subject: Check nullptr in ZWPTextInputWrapperV1::Activate()
|
||||
|
||||
After the CL https://crrev.com/c/4160118 a crash occurres on the
|
||||
wl::get_version_of_object() call in ZWPTextInputWrapperV1::Activate()
|
||||
when |ZWPTextInputWrapperV1::extended_obj_| is not set.
|
||||
|
||||
Added nullptr check to fix it.
|
||||
|
||||
Bug: b:251677220, 1431532
|
||||
Change-Id: Ia5606f1c0d08f552f1091b2a9350655f4bdac939
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4423030
|
||||
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
|
||||
Reviewed-by: Maksim Sisov <msisov@igalia.com>
|
||||
Commit-Queue: Maksim Sisov <msisov@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1137771}
|
||||
|
||||
diff --git a/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc b/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
|
||||
index d577ac4f822901340281c48bc754425484f28f48..b9e508824c7cb17c0673007532f88242a99fa5df 100644
|
||||
--- a/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
|
||||
+++ b/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
|
||||
@@ -156,8 +156,9 @@ void ZWPTextInputWrapperV1::Reset() {
|
||||
void ZWPTextInputWrapperV1::Activate(WaylandWindow* window,
|
||||
TextInputClient::FocusReason reason) {
|
||||
DCHECK(connection_->seat());
|
||||
- if (wl::get_version_of_object(extended_obj_.get()) >=
|
||||
- ZCR_EXTENDED_TEXT_INPUT_V1_SET_FOCUS_REASON_SINCE_VERSION) {
|
||||
+ if (extended_obj_.get() &&
|
||||
+ wl::get_version_of_object(extended_obj_.get()) >=
|
||||
+ ZCR_EXTENDED_TEXT_INPUT_V1_SET_FOCUS_REASON_SINCE_VERSION) {
|
||||
absl::optional<uint32_t> wayland_focus_reason;
|
||||
switch (reason) {
|
||||
case ui::TextInputClient::FocusReason::FOCUS_REASON_NONE:
|
||||
Reference in New Issue
Block a user