patches: move block_input fix to 0001 where pattern is introduced
The block_input/record_unwind_protect_void ordering fix and its explanatory comment belong in 0001 (ns_ax_buffer_text), which is where the pattern is first introduced. Having the fragile pattern visible across patches 0001-0007 invites review comments. Remove the now-redundant block_input reordering hunk from 0008; 0001 already establishes the correct order with the comment.
This commit is contained in:
@@ -200,7 +200,7 @@ index 88c9251c18..9d36de66f9 100644
|
||||
#include "systime.h"
|
||||
#include "character.h"
|
||||
#include "xwidget.h"
|
||||
@@ -7201,6 +7202,432 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
|
||||
@@ -7201,6 +7202,436 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -249,8 +249,12 @@ index 88c9251c18..9d36de66f9 100644
|
||||
+
|
||||
+ specpdl_ref count = SPECPDL_INDEX ();
|
||||
+ record_unwind_current_buffer ();
|
||||
+ record_unwind_protect_void (unblock_input);
|
||||
+ /* block_input must precede record_unwind_protect_void (unblock_input):
|
||||
+ if anything between SPECPDL_INDEX and block_input were to throw,
|
||||
+ the unwind handler would call unblock_input without a matching
|
||||
+ block_input, corrupting the input-blocking reference count. */
|
||||
+ block_input ();
|
||||
+ record_unwind_protect_void (unblock_input);
|
||||
+ if (b != current_buffer)
|
||||
+ set_buffer_internal_1 (b);
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user