emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c4921d1157: Fix GC marking of input events with devices


From: Po Lu
Subject: master c4921d1157: Fix GC marking of input events with devices
Date: Fri, 8 Apr 2022 05:01:02 -0400 (EDT)

branch: master
commit c4921d1157a2e3e15b1d779a6bdf768e307275dd
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix GC marking of input events with devices
    
    * src/keyboard.c (mark_kboards):
    * src/pgtkterm.c (mark_pgtkterm): Mark `device' as well.
---
 src/keyboard.c | 6 ++++++
 src/pgtkterm.c | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/keyboard.c b/src/keyboard.c
index 01274b4d4a..588ee75ee0 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -13088,6 +13088,12 @@ mark_kboards (void)
          mark_object (event->ie.y);
          mark_object (event->ie.frame_or_window);
          mark_object (event->ie.arg);
+
+         /* This should never be allocated for a single event, but
+            mark it anyway in the situation where the list of devices
+            changed but an event with an old device is still present
+            in the queue.  */
+         mark_object (event->ie.device);
        }
     }
 }
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index d8c6dad2f9..fb62f5978d 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -347,6 +347,7 @@ mark_pgtkterm (void)
       mark_object (ev->ie.y);
       mark_object (ev->ie.frame_or_window);
       mark_object (ev->ie.arg);
+      mark_object (ev->ie.device);
     }
 
   for (dpyinfo = x_display_list; dpyinfo;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]