Skip to content

Commit 3e13d70

Browse files
authored
[RN] Remove debugging invariant (facebook#18813)
1 parent f6fcae5 commit 3e13d70

10 files changed

+0
-50
lines changed

packages/react-reconciler/src/ReactFiber.new.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
enableFundamentalAPI,
2929
enableScopeAPI,
3030
enableBlocksAPI,
31-
throwEarlyForMysteriousError,
3231
} from 'shared/ReactFeatureFlags';
3332
import {NoEffect, Placement} from './ReactSideEffectTags';
3433
import {ConcurrentRoot, BlockingRoot} from './ReactRootTags';
@@ -304,18 +303,6 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
304303
}
305304
}
306305

307-
if (throwEarlyForMysteriousError) {
308-
// Trying to debug a mysterious internal-only production failure.
309-
// See D20130868 and t62461245.
310-
// This is only on for RN FB builds.
311-
if (current == null) {
312-
throw Error('current is ' + current + " but it can't be");
313-
}
314-
if (workInProgress == null) {
315-
throw Error('workInProgress is ' + workInProgress + " but it can't be");
316-
}
317-
}
318-
319306
workInProgress.childLanes = current.childLanes;
320307
workInProgress.lanes = current.lanes;
321308

packages/react-reconciler/src/ReactFiber.old.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
enableFundamentalAPI,
2828
enableScopeAPI,
2929
enableBlocksAPI,
30-
throwEarlyForMysteriousError,
3130
} from 'shared/ReactFeatureFlags';
3231
import {NoEffect, Placement} from './ReactSideEffectTags';
3332
import {ConcurrentRoot, BlockingRoot} from './ReactRootTags';
@@ -299,18 +298,6 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
299298
}
300299
}
301300

302-
if (throwEarlyForMysteriousError) {
303-
// Trying to debug a mysterious internal-only production failure.
304-
// See D20130868 and t62461245.
305-
// This is only on for RN FB builds.
306-
if (current == null) {
307-
throw Error('current is ' + current + " but it can't be");
308-
}
309-
if (workInProgress == null) {
310-
throw Error('workInProgress is ' + workInProgress + " but it can't be");
311-
}
312-
}
313-
314301
workInProgress.childExpirationTime = current.childExpirationTime;
315302
workInProgress.expirationTime = current.expirationTime;
316303

packages/shared/ReactFeatureFlags.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ export const warnAboutSpreadingKeyToJSX = false;
100100

101101
export const enableComponentStackLocations = __EXPERIMENTAL__;
102102

103-
// Internal-only attempt to debug a React Native issue. See D20130868.
104-
export const throwEarlyForMysteriousError = false;
105-
106103
export const enableNewReconciler = false;
107104

108105
// --------------------------

packages/shared/forks/ReactFeatureFlags.native-fb.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ export const enableComponentStackLocations = false;
4545
export const enableLegacyFBSupport = false;
4646
export const enableFilterEmptyStringAttributesDOM = false;
4747

48-
// Internal-only attempt to debug a React Native issue. See D20130868.
49-
export const throwEarlyForMysteriousError = true;
50-
5148
export const enableNewReconciler = false;
5249

5350
// Flow magic to verify the exports of this file match the original version.

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
4444
export const enableLegacyFBSupport = false;
4545
export const enableFilterEmptyStringAttributesDOM = false;
4646

47-
// Internal-only attempt to debug a React Native issue. See D20130868.
48-
export const throwEarlyForMysteriousError = false;
49-
5047
export const enableNewReconciler = false;
5148

5249
// Flow magic to verify the exports of this file match the original version.

packages/shared/forks/ReactFeatureFlags.test-renderer.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
4444
export const enableLegacyFBSupport = false;
4545
export const enableFilterEmptyStringAttributesDOM = false;
4646

47-
// Internal-only attempt to debug a React Native issue. See D20130868.
48-
export const throwEarlyForMysteriousError = false;
49-
5047
export const enableNewReconciler = false;
5148

5249
// Flow magic to verify the exports of this file match the original version.

packages/shared/forks/ReactFeatureFlags.test-renderer.www.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
4444
export const enableLegacyFBSupport = false;
4545
export const enableFilterEmptyStringAttributesDOM = false;
4646

47-
// Internal-only attempt to debug a React Native issue. See D20130868.
48-
export const throwEarlyForMysteriousError = false;
49-
5047
export const enableNewReconciler = false;
5148

5249
// Flow magic to verify the exports of this file match the original version.

packages/shared/forks/ReactFeatureFlags.testing.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
4444
export const enableLegacyFBSupport = false;
4545
export const enableFilterEmptyStringAttributesDOM = false;
4646

47-
// Internal-only attempt to debug a React Native issue. See D20130868.
48-
export const throwEarlyForMysteriousError = false;
49-
5047
export const enableNewReconciler = false;
5148

5249
// Flow magic to verify the exports of this file match the original version.

packages/shared/forks/ReactFeatureFlags.testing.www.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
4444
export const enableLegacyFBSupport = !__EXPERIMENTAL__;
4545
export const enableFilterEmptyStringAttributesDOM = false;
4646

47-
// Internal-only attempt to debug a React Native issue. See D20130868.
48-
export const throwEarlyForMysteriousError = false;
49-
5047
export const enableNewReconciler = false;
5148

5249
// Flow magic to verify the exports of this file match the original version.

packages/shared/forks/ReactFeatureFlags.www.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ export const disableTextareaChildren = __EXPERIMENTAL__;
6868

6969
export const warnUnstableRenderSubtreeIntoContainer = false;
7070

71-
// Internal-only attempt to debug a React Native issue. See D20130868.
72-
export const throwEarlyForMysteriousError = false;
73-
7471
// Enable forked reconciler. Piggy-backing on the "variant" global so that we
7572
// don't have to add another test dimension. The build system will compile this
7673
// to the correct value.

0 commit comments

Comments
 (0)