Skip to content

Commit

Permalink
[RN] Remove debugging invariant
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 4, 2020
1 parent f6fcae5 commit 5e3ea9e
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 50 deletions.
13 changes: 0 additions & 13 deletions packages/react-reconciler/src/ReactFiber.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
enableFundamentalAPI,
enableScopeAPI,
enableBlocksAPI,
throwEarlyForMysteriousError,
} from 'shared/ReactFeatureFlags';
import {NoEffect, Placement} from './ReactSideEffectTags';
import {ConcurrentRoot, BlockingRoot} from './ReactRootTags';
Expand Down Expand Up @@ -304,18 +303,6 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
}
}

if (throwEarlyForMysteriousError) {
// Trying to debug a mysterious internal-only production failure.
// See D20130868 and t62461245.
// This is only on for RN FB builds.
if (current == null) {
throw Error('current is ' + current + " but it can't be");
}
if (workInProgress == null) {
throw Error('workInProgress is ' + workInProgress + " but it can't be");
}
}

workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;

Expand Down
13 changes: 0 additions & 13 deletions packages/react-reconciler/src/ReactFiber.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
enableFundamentalAPI,
enableScopeAPI,
enableBlocksAPI,
throwEarlyForMysteriousError,
} from 'shared/ReactFeatureFlags';
import {NoEffect, Placement} from './ReactSideEffectTags';
import {ConcurrentRoot, BlockingRoot} from './ReactRootTags';
Expand Down Expand Up @@ -299,18 +298,6 @@ export function createWorkInProgress(current: Fiber, pendingProps: any): Fiber {
}
}

if (throwEarlyForMysteriousError) {
// Trying to debug a mysterious internal-only production failure.
// See D20130868 and t62461245.
// This is only on for RN FB builds.
if (current == null) {
throw Error('current is ' + current + " but it can't be");
}
if (workInProgress == null) {
throw Error('workInProgress is ' + workInProgress + " but it can't be");
}
}

workInProgress.childExpirationTime = current.childExpirationTime;
workInProgress.expirationTime = current.expirationTime;

Expand Down
3 changes: 0 additions & 3 deletions packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ export const warnAboutSpreadingKeyToJSX = false;

export const enableComponentStackLocations = __EXPERIMENTAL__;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = false;

export const enableNewReconciler = false;

// --------------------------
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ export const enableComponentStackLocations = false;
export const enableLegacyFBSupport = false;
export const enableFilterEmptyStringAttributesDOM = false;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = true;

export const enableNewReconciler = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.native-oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
export const enableLegacyFBSupport = false;
export const enableFilterEmptyStringAttributesDOM = false;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = false;

export const enableNewReconciler = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.test-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
export const enableLegacyFBSupport = false;
export const enableFilterEmptyStringAttributesDOM = false;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = false;

export const enableNewReconciler = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
export const enableLegacyFBSupport = false;
export const enableFilterEmptyStringAttributesDOM = false;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = false;

export const enableNewReconciler = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
export const enableLegacyFBSupport = false;
export const enableFilterEmptyStringAttributesDOM = false;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = false;

export const enableNewReconciler = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.testing.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ export const enableComponentStackLocations = false;
export const enableLegacyFBSupport = !__EXPERIMENTAL__;
export const enableFilterEmptyStringAttributesDOM = false;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = false;

export const enableNewReconciler = false;

// Flow magic to verify the exports of this file match the original version.
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ export const disableTextareaChildren = __EXPERIMENTAL__;

export const warnUnstableRenderSubtreeIntoContainer = false;

// Internal-only attempt to debug a React Native issue. See D20130868.
export const throwEarlyForMysteriousError = false;

// Enable forked reconciler. Piggy-backing on the "variant" global so that we
// don't have to add another test dimension. The build system will compile this
// to the correct value.
Expand Down

0 comments on commit 5e3ea9e

Please sign in to comment.