emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: RE: weird defadvice bug with byte-compilation]


From: Richard M. Stallman
Subject: Re: address@hidden: RE: weird defadvice bug with byte-compilation]
Date: Fri, 16 Dec 2005 20:05:24 -0500

    +   /* Do this before the call to w32_window, since that can call Feval
    +      (e.g., to compute the frame's menu bar) and throw an error, which
    +      will leave this frame unregistered.  */
    +   Vframe_list = Fcons (frame, Vframe_list);
    + 
        w32_window (f, window_prompting, minibuffer_only);
        x_icon (f, parameters);
        x_make_gc (f);


Changing Vframe_list so early, before calling w32_window, could be
dangerous.  What if some part of window creation fails, or x_icon, or
x_make_gc?  While I am not sure of how things worn on Windows, if
those fail I suspect it will leave a bad situation.  You would not want
such a frame to be considered live.

I think the right fix is keep the setting of Vframe_list where it was,
and instead move the creation of the menu bar out of w32_window and
put it at a later place in Fx_create_frame.  That would make the code
more like what it is in xfns.c, where the menu bar creation step
is done later, after the frame is already safely in existence.







reply via email to

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