Mercurial > hg > xemacs-beta
comparison src/frame.c @ 1313:671b65f2b075
[xemacs-hg @ 2003-02-20 01:12:25 by ben]
patch for crashes when deleting frames
eval.c: Don't check_quit() unless we're unbinding a real Lisp
`unwind-protect' since check_quit() does lots of weird things and
not all callers are prepared for it.
frame.c: Make absolutely sure there is no quit checking while we are in a
"critical section" during frame deletion.
author | ben |
---|---|
date | Thu, 20 Feb 2003 01:12:26 +0000 |
parents | e22b0213b713 |
children | b531bf8658e9 |
comparison
equal
deleted
inserted
replaced
1312:22741407fc1f | 1313:671b65f2b075 |
---|---|
1457 struct console *con; | 1457 struct console *con; |
1458 Lisp_Object frame; | 1458 Lisp_Object frame; |
1459 Lisp_Object device; | 1459 Lisp_Object device; |
1460 Lisp_Object console; | 1460 Lisp_Object console; |
1461 struct gcpro gcpro1; | 1461 struct gcpro gcpro1; |
1462 int depth; | |
1462 | 1463 |
1463 /* OK to delete an already deleted frame. */ | 1464 /* OK to delete an already deleted frame. */ |
1464 if (!FRAME_LIVE_P (f)) | 1465 if (!FRAME_LIVE_P (f)) |
1465 return; | 1466 return; |
1466 | 1467 |
1680 Fselect_window (minibuf_window, Qnil); | 1681 Fselect_window (minibuf_window, Qnil); |
1681 } | 1682 } |
1682 | 1683 |
1683 /* After this point, no errors must be allowed to occur. */ | 1684 /* After this point, no errors must be allowed to occur. */ |
1684 | 1685 |
1686 /* Checking for QUIT can run all sorts of weird code and may be deadly | |
1687 so don't let it happen. */ | |
1688 depth = begin_dont_check_for_quit (); | |
1689 | |
1685 #ifdef HAVE_MENUBARS | 1690 #ifdef HAVE_MENUBARS |
1686 free_frame_menubars (f); | 1691 free_frame_menubars (f); |
1687 #endif | 1692 #endif |
1688 #ifdef HAVE_SCROLLBARS | 1693 #ifdef HAVE_SCROLLBARS |
1689 free_frame_scrollbars (f); | 1694 free_frame_scrollbars (f); |
1819 nuke_all_frame_slots (f); | 1824 nuke_all_frame_slots (f); |
1820 f->framemeths = dead_console_methods; | 1825 f->framemeths = dead_console_methods; |
1821 f->frametype = dead_console; | 1826 f->frametype = dead_console; |
1822 | 1827 |
1823 note_object_deleted (frame); | 1828 note_object_deleted (frame); |
1829 | |
1830 unbind_to (depth); | |
1824 | 1831 |
1825 UNGCPRO; | 1832 UNGCPRO; |
1826 } | 1833 } |
1827 | 1834 |
1828 void | 1835 void |