From 9455c7cc93347c98d132538c4b0d03f090899e21 Mon Sep 17 00:00:00 2001 From: David Sancho Moreno Date: Mon, 16 Dec 2024 19:08:41 +0100 Subject: [PATCH] Replace // @nocollapse with a args reference --- packages/react-dom/src/client/ReactDOMRoot.js | 4 ++-- packages/react-reconciler/src/ReactFiberHooks.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-dom/src/client/ReactDOMRoot.js b/packages/react-dom/src/client/ReactDOMRoot.js index 4c0355a2a0ca3..5cef2d28437b0 100644 --- a/packages/react-dom/src/client/ReactDOMRoot.js +++ b/packages/react-dom/src/client/ReactDOMRoot.js @@ -106,7 +106,7 @@ ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = } if (__DEV__) { - // @nocollapse - avoid GCC optimizations affecting function arity + // using a reference to `arguments` bails out of GCC optimizations which affect function arity const args = arguments; if (typeof args[1] === 'function') { console.error( @@ -133,7 +133,7 @@ ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = // $FlowFixMe[missing-this-annot] function (): void { if (__DEV__) { - // @nocollapse - avoid GCC optimizations affecting function arity + // using a reference to `arguments` bails out of GCC optimizations which affect function arity const args = arguments; if (typeof args[0] === 'function') { console.error( diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js index be2e280ba6e0f..284d6cabc85ee 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.js +++ b/packages/react-reconciler/src/ReactFiberHooks.js @@ -3644,7 +3644,7 @@ function dispatchReducerAction( action: A, ): void { if (__DEV__) { - // @nocollapse - avoid GCC optimizations affecting function arity + // using a reference to `arguments` bails out of GCC optimizations which affect function arity const args = arguments; if (typeof args[3] === 'function') { console.error( @@ -3686,7 +3686,7 @@ function dispatchSetState( action: A, ): void { if (__DEV__) { - // @nocollapse - avoid GCC optimizations affecting function arity + // using a reference to `arguments` bails out of GCC optimizations which affect function arity const args = arguments; if (typeof args[3] === 'function') { console.error(