Skip to content

Commit d5fd60f

Browse files
Remove findInstanceBlockingEvent unused parameters (#26534)
## Summary First three parameters of `findInstanceBlockingEvent` are unused since I think if we remove the unused parameters it makes it easier to know that which parameters is need by `findInstanceBlockingEvent`. ## How did you test this change? Existing tests.
1 parent eeabb73 commit d5fd60f

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

packages/react-dom-bindings/src/events/ReactDOMEventListener.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,7 @@ export function dispatchEvent(
155155
return;
156156
}
157157

158-
let blockedOn = findInstanceBlockingEvent(
159-
domEventName,
160-
eventSystemFlags,
161-
targetContainer,
162-
nativeEvent,
163-
);
158+
let blockedOn = findInstanceBlockingEvent(nativeEvent);
164159
if (blockedOn === null) {
165160
dispatchEventForPluginEventSystem(
166161
domEventName,
@@ -198,12 +193,7 @@ export function dispatchEvent(
198193
if (fiber !== null) {
199194
attemptSynchronousHydration(fiber);
200195
}
201-
const nextBlockedOn = findInstanceBlockingEvent(
202-
domEventName,
203-
eventSystemFlags,
204-
targetContainer,
205-
nativeEvent,
206-
);
196+
const nextBlockedOn = findInstanceBlockingEvent(nativeEvent);
207197
if (nextBlockedOn === null) {
208198
dispatchEventForPluginEventSystem(
209199
domEventName,
@@ -240,9 +230,6 @@ export let return_targetInst: null | Fiber = null;
240230
// Returns a SuspenseInstance or Container if it's blocked.
241231
// The return_targetInst field above is conceptually part of the return value.
242232
export function findInstanceBlockingEvent(
243-
domEventName: DOMEventName,
244-
eventSystemFlags: EventSystemFlags,
245-
targetContainer: EventTarget,
246233
nativeEvent: AnyNativeEvent,
247234
): null | Container | SuspenseInstance {
248235
// TODO: Warn if _enabled is false.

packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,13 +376,7 @@ function attemptReplayContinuousQueuedEvent(
376376
}
377377
const targetContainers = queuedEvent.targetContainers;
378378
while (targetContainers.length > 0) {
379-
const targetContainer = targetContainers[0];
380-
const nextBlockedOn = findInstanceBlockingEvent(
381-
queuedEvent.domEventName,
382-
queuedEvent.eventSystemFlags,
383-
targetContainer,
384-
queuedEvent.nativeEvent,
385-
);
379+
const nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
386380
if (nextBlockedOn === null) {
387381
const nativeEvent = queuedEvent.nativeEvent;
388382
const nativeEventClone = new nativeEvent.constructor(

0 commit comments

Comments
 (0)