@@ -37,26 +37,19 @@ let eventQueue: ?(Array<ReactSyntheticEvent> | ReactSyntheticEvent) = null;
3737 * Dispatches an event and releases it back into the pool, unless persistent.
3838 *
3939 * @param {?object } event Synthetic event to be dispatched.
40- * @param {boolean } simulated If the event is simulated (changes exn behavior)
4140 * @private
4241 */
43- const executeDispatchesAndRelease = function (
44- event : ReactSyntheticEvent ,
45- simulated : boolean ,
46- ) {
42+ const executeDispatchesAndRelease = function ( event : ReactSyntheticEvent ) {
4743 if ( event ) {
48- executeDispatchesInOrder ( event , simulated ) ;
44+ executeDispatchesInOrder ( event ) ;
4945
5046 if ( ! event . isPersistent ( ) ) {
5147 event . constructor . release ( event ) ;
5248 }
5349 }
5450} ;
55- const executeDispatchesAndReleaseSimulated = function ( e ) {
56- return executeDispatchesAndRelease ( e , true ) ;
57- } ;
5851const executeDispatchesAndReleaseTopLevel = function ( e ) {
59- return executeDispatchesAndRelease ( e , false ) ;
52+ return executeDispatchesAndRelease ( e ) ;
6053} ;
6154
6255function isInteractive ( tag ) {
@@ -192,7 +185,6 @@ function extractEvents(
192185
193186export function runEventsInBatch (
194187 events : Array < ReactSyntheticEvent > | ReactSyntheticEvent | null ,
195- simulated : boolean ,
196188) {
197189 if ( events !== null ) {
198190 eventQueue = accumulateInto ( eventQueue , events ) ;
@@ -207,17 +199,7 @@ export function runEventsInBatch(
207199 return ;
208200 }
209201
210- if ( simulated ) {
211- forEachAccumulated (
212- processingEventQueue ,
213- executeDispatchesAndReleaseSimulated ,
214- ) ;
215- } else {
216- forEachAccumulated (
217- processingEventQueue ,
218- executeDispatchesAndReleaseTopLevel ,
219- ) ;
220- }
202+ forEachAccumulated ( processingEventQueue , executeDispatchesAndReleaseTopLevel ) ;
221203 invariant (
222204 ! eventQueue ,
223205 'processEventQueue(): Additional events were enqueued while processing ' +
@@ -239,5 +221,5 @@ export function runExtractedEventsInBatch(
239221 nativeEvent ,
240222 nativeEventTarget ,
241223 ) ;
242- runEventsInBatch ( events , false ) ;
224+ runEventsInBatch ( events ) ;
243225}
0 commit comments