]> git.eshelyaron.com Git - emacs.git/commitdiff
(load_face_font, free_realized_face, clear_face_gcs):
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Sep 2007 17:50:09 +0000 (17:50 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 29 Sep 2007 17:50:09 +0000 (17:50 +0000)
Don't let signal handlers run when a GC is freed but not yet NULL'ed.
(x_free_gc): Remove BLOCK_INPUT since it's now redundant.

src/ChangeLog
src/xfaces.c

index ac56b160c88ff345f0da88f4f8f00a72f5d912bd..d5ca272fe51b7a4bb19d22882bb0923ff3da9a88 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * xfaces.c (load_face_font, free_realized_face, clear_face_gcs):
+       Don't let signal handlers run when a GC is freed but not yet NULL'ed.
+       (x_free_gc): Remove BLOCK_INPUT since it's now redundant.
+
 2007-09-28  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * Makefile.in (lisp, shortlisp): Delete server.elc, it is not
index b1fcf28d9c3f84799dbb40e70f3702aa51bba6f8..01ac364589fd6fac869019bec62ce5524b2744a0 100644 (file)
@@ -744,10 +744,9 @@ x_free_gc (f, gc)
      struct frame *f;
      GC gc;
 {
-  BLOCK_INPUT;
+  eassert (interrupt_input_blocked);
   IF_DEBUG (xassert (--ngcs >= 0));
   XFreeGC (FRAME_X_DISPLAY (f), gc);
-  UNBLOCK_INPUT;
 }
 
 #endif /* HAVE_X_WINDOWS */
@@ -777,10 +776,8 @@ x_free_gc (f, gc)
      struct frame *f;
      GC gc;
 {
-  BLOCK_INPUT;
   IF_DEBUG (xassert (--ngcs >= 0));
   xfree (gc);
-  UNBLOCK_INPUT;
 }
 
 #endif  /* WINDOWSNT */
@@ -807,10 +804,9 @@ x_free_gc (f, gc)
      struct frame *f;
      GC gc;
 {
-  BLOCK_INPUT;
+  eassert (interrupt_input_blocked);
   IF_DEBUG (xassert (--ngcs >= 0));
   XFreeGC (FRAME_MAC_DISPLAY (f), gc);
-  UNBLOCK_INPUT;
 }
 
 #endif  /* MAC_OS */
@@ -1257,8 +1253,10 @@ load_face_font (f, face, c)
       face->overstrike = needs_overstrike;
       if (face->gc)
        {
+         BLOCK_INPUT;
          x_free_gc (f, face->gc);
          face->gc = 0;
+         UNBLOCK_INPUT;
        }
     }
   else
@@ -5256,8 +5254,10 @@ free_realized_face (f, face)
            free_face_fontset (f, face);
          if (face->gc)
            {
+             BLOCK_INPUT;
              x_free_gc (f, face->gc);
              face->gc = 0;
+             UNBLOCK_INPUT;
            }
 
          free_face_colors (f, face);
@@ -5421,8 +5421,10 @@ clear_face_gcs (c)
          struct face *face = c->faces_by_id[i];
          if (face && face->gc)
            {
+             BLOCK_INPUT;
              x_free_gc (c->f, face->gc);
              face->gc = 0;
+             UNBLOCK_INPUT;
            }
        }
 #endif /* HAVE_WINDOW_SYSTEM */