Skip to content

[RN] Remove debugging invariant #18813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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