aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xfns.c41
2 files changed, 28 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 93c27a6e565..3f9b4577460 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12014-08-03 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Fix bug with an attempt to select uninitialized frame (Bug#18161).
4 * xfns.c (Fx_create_frame): Move call to change_frame_size to
5 a section where Lisp evaluation is disabled. This way a pointer
6 to uninitialized frame is not accessible from Lisp, which becomes
7 critical if following call to x_figure_window_size throws an error.
8
12014-08-02 Paul Eggert <eggert@cs.ucla.edu> 92014-08-02 Paul Eggert <eggert@cs.ucla.edu>
2 10
3 Fix bug with clang + directory_files_internal + GC (Bug#16986). 11 Fix bug with clang + directory_files_internal + GC (Bug#16986).
diff --git a/src/xfns.c b/src/xfns.c
index 23fba44f1f3..96a4b07b150 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2884,7 +2884,7 @@ This function is an internal primitive--use `make-frame' instead. */)
2884 int minibuffer_only = 0; 2884 int minibuffer_only = 0;
2885 long window_prompting = 0; 2885 long window_prompting = 0;
2886 int width, height; 2886 int width, height;
2887 ptrdiff_t count = SPECPDL_INDEX (); 2887 ptrdiff_t count = SPECPDL_INDEX (), count2;
2888 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 2888 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
2889 Lisp_Object display; 2889 Lisp_Object display;
2890 struct x_display_info *dpyinfo = NULL; 2890 struct x_display_info *dpyinfo = NULL;
@@ -3130,6 +3130,14 @@ This function is an internal primitive--use `make-frame' instead. */)
3130 end up in init_iterator with a null face cache, which should not 3130 end up in init_iterator with a null face cache, which should not
3131 happen. */ 3131 happen. */
3132 init_frame_faces (f); 3132 init_frame_faces (f);
3133
3134 /* Temporary disable window-configuration-change-hook to avoid
3135 an infloop in next_frame and access to uninitialized frame
3136 from Lisp code (Bug#18161). */
3137
3138 count2 = SPECPDL_INDEX ();
3139 record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
3140 inhibit_lisp_code = Qt;
3133 3141
3134 /* PXW: This is a duplicate from below. We have to do it here since 3142 /* PXW: This is a duplicate from below. We have to do it here since
3135 otherwise x_set_tool_bar_lines will work with the character sizes 3143 otherwise x_set_tool_bar_lines will work with the character sizes
@@ -3145,27 +3153,18 @@ This function is an internal primitive--use `make-frame' instead. */)
3145 /* Set the menu-bar-lines and tool-bar-lines parameters. We don't 3153 /* Set the menu-bar-lines and tool-bar-lines parameters. We don't
3146 look up the X resources controlling the menu-bar and tool-bar 3154 look up the X resources controlling the menu-bar and tool-bar
3147 here; they are processed specially at startup, and reflected in 3155 here; they are processed specially at startup, and reflected in
3148 the values of the mode variables. 3156 the values of the mode variables. */
3149 3157
3150 Avoid calling window-configuration-change-hook; otherwise we 3158 x_default_parameter (f, parms, Qmenu_bar_lines,
3151 could get an infloop in next_frame since the frame is not yet in 3159 NILP (Vmenu_bar_mode)
3152 Vframe_list. */ 3160 ? make_number (0) : make_number (1),
3153 { 3161 NULL, NULL, RES_TYPE_NUMBER);
3154 ptrdiff_t count2 = SPECPDL_INDEX (); 3162 x_default_parameter (f, parms, Qtool_bar_lines,
3155 record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code); 3163 NILP (Vtool_bar_mode)
3156 inhibit_lisp_code = Qt; 3164 ? make_number (0) : make_number (1),
3157 3165 NULL, NULL, RES_TYPE_NUMBER);
3158 x_default_parameter (f, parms, Qmenu_bar_lines, 3166
3159 NILP (Vmenu_bar_mode) 3167 unbind_to (count2, Qnil);
3160 ? make_number (0) : make_number (1),
3161 NULL, NULL, RES_TYPE_NUMBER);
3162 x_default_parameter (f, parms, Qtool_bar_lines,
3163 NILP (Vtool_bar_mode)
3164 ? make_number (0) : make_number (1),
3165 NULL, NULL, RES_TYPE_NUMBER);
3166
3167 unbind_to (count2, Qnil);
3168 }
3169 3168
3170 x_default_parameter (f, parms, Qbuffer_predicate, Qnil, 3169 x_default_parameter (f, parms, Qbuffer_predicate, Qnil,
3171 "bufferPredicate", "BufferPredicate", 3170 "bufferPredicate", "BufferPredicate",