Skip to content

Commit

Permalink
Replace // @nocollapse with a args reference
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Dec 16, 2024
1 parent 77864e0 commit 9455c7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/client/ReactDOMRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3644,7 +3644,7 @@ function dispatchReducerAction<S, A>(
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(
Expand Down Expand Up @@ -3686,7 +3686,7 @@ function dispatchSetState<S, A>(
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(
Expand Down

0 comments on commit 9455c7c

Please sign in to comment.