unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51701: 29.0.50; [PATCH] Make kill_frame_xwidget_views safe
       [not found] <87pmr9alen.fsf.ref@yahoo.com>
@ 2021-11-09  6:33 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-11-09  6:44   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-11-09  6:33 UTC (permalink / raw)
  To: 51701

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Make-kill_frame_xwidget_views-safe.patch --]
[-- Type: text/x-patch, Size: 921 bytes --]

From e1a231961c36a3a5d1229aa5268b4515bd6aef31 Mon Sep 17 00:00:00 2001
From: Po Lu <luangruo@yahoo.com>
Date: Tue, 9 Nov 2021 14:31:12 +0800
Subject: [PATCH] Make `kill_frame_xwidget_views' safe

This makes kill_frame_xwidget_views still work even if the user
injects nonsense into `xwidget-view-list'.

* src/xwidget.c (kill_frame_xwidget_views): Check XWIDGET_VIEW_P.
---
 src/xwidget.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xwidget.c b/src/xwidget.c
index 614eb46d93..90178f441d 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -2388,7 +2388,8 @@ kill_frame_xwidget_views (struct frame *f)
   for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
        tail = XCDR (tail))
     {
-      if (XXWIDGET_VIEW (XCAR (tail))->frame == f)
+      if (XWIDGET_VIEW_P (XCAR (tail))
+	  && XXWIDGET_VIEW (XCAR (tail))->frame == f)
 	rem = Fcons (XCAR (tail), rem);
     }
 
-- 
2.31.1


[-- Attachment #2: Type: text/plain, Size: 9 bytes --]


Thanks.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#51701: 29.0.50; [PATCH] Make kill_frame_xwidget_views safe
  2021-11-09  6:33 ` bug#51701: 29.0.50; [PATCH] Make kill_frame_xwidget_views safe Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-11-09  6:44   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-09  6:44 UTC (permalink / raw)
  To: Po Lu; +Cc: 51701

Po Lu <luangruo@yahoo.com> writes:

> Thanks.

Pushed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-09  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87pmr9alen.fsf.ref@yahoo.com>
2021-11-09  6:33 ` bug#51701: 29.0.50; [PATCH] Make kill_frame_xwidget_views safe Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-09  6:44   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).