* alloc.c (mark_object): Revert window marking code
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 6 Sep 2012 07:10:25 +0000 (11:10 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 6 Sep 2012 07:10:25 +0000 (11:10 +0400)
since it's unsafe for the Fset_window_configuration.

src/ChangeLog
src/alloc.c

index 24d290e..990cba3 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-06  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * alloc.c (mark_object): Revert window marking code
+       since it's unsafe for the Fset_window_configuration.
+
 2012-09-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix race conditions with signal handlers and errno.
index e90cca6..aca0a82 100644 (file)
@@ -6019,22 +6019,18 @@ mark_object (Lisp_Object arg)
          case PVEC_WINDOW:
            {
              struct window *w = (struct window *) ptr;
-             bool leaf = NILP (w->hchild) && NILP (w->vchild);
-
-             if (leaf && NILP (w->buffer))
-               /* If the window is deleted, mark just the window itself.  */
-               VECTOR_MARK (ptr);
-             else
+             
+             /* Even if the window is deleted, we can't mark just the window
+                itself because set-window-configuration can resurrect it.  */
+             mark_vectorlike (ptr);
+             /* Mark glyphs for leaf windows.  Marking window
+                matrices is sufficient because frame matrices
+                use the same glyph memory.  */
+             if (NILP (w->hchild) && NILP (w->vchild)
+                 && w->current_matrix)
                {
-                 mark_vectorlike (ptr);
-                 /* Mark glyphs for leaf windows.  Marking window
-                    matrices is sufficient because frame matrices
-                    use the same glyph memory.  */
-                 if (leaf && w->current_matrix)
-                   {
-                     mark_glyph_matrix (w->current_matrix);
-                     mark_glyph_matrix (w->desired_matrix);
-                   }
+                 mark_glyph_matrix (w->current_matrix);
+                 mark_glyph_matrix (w->desired_matrix);
                }
            }
            break;