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 "systime.h"
|
||||||
#include "character.h"
|
#include "character.h"
|
||||||
#include "xwidget.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
|
#endif
|
||||||
|
|
||||||
@@ -249,8 +249,12 @@ index 88c9251c18..9d36de66f9 100644
|
|||||||
+
|
+
|
||||||
+ specpdl_ref count = SPECPDL_INDEX ();
|
+ specpdl_ref count = SPECPDL_INDEX ();
|
||||||
+ record_unwind_current_buffer ();
|
+ 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 ();
|
+ block_input ();
|
||||||
|
+ record_unwind_protect_void (unblock_input);
|
||||||
+ if (b != current_buffer)
|
+ if (b != current_buffer)
|
||||||
+ set_buffer_internal_1 (b);
|
+ set_buffer_internal_1 (b);
|
||||||
+
|
+
|
||||||
|
|||||||
@@ -318,21 +318,6 @@ index 8ef344d9fe..1acb64630a 100644
|
|||||||
/* Build accessibility text for window W, skipping invisible text.
|
/* Build accessibility text for window W, skipping invisible text.
|
||||||
Populates *OUT_START with the buffer start charpos.
|
Populates *OUT_START with the buffer start charpos.
|
||||||
Populates *OUT_RUNS with an array of visible runs and *OUT_NRUNS
|
Populates *OUT_RUNS with an array of visible runs and *OUT_NRUNS
|
||||||
@@ -7440,9 +7557,13 @@ visual line index for Zoom (skip whitespace-only lines
|
|
||||||
return @"";
|
|
||||||
|
|
||||||
specpdl_ref count = SPECPDL_INDEX ();
|
|
||||||
+ /* 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_current_buffer ();
|
|
||||||
record_unwind_protect_void (unblock_input);
|
|
||||||
- block_input ();
|
|
||||||
if (b != current_buffer)
|
|
||||||
set_buffer_internal_1 (b);
|
|
||||||
|
|
||||||
@@ -8605,6 +8726,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
@@ -8605,6 +8726,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
||||||
|
|
||||||
[self ensureTextCache];
|
[self ensureTextCache];
|
||||||
|
|||||||
Reference in New Issue
Block a user