GeezerVison is showing github.com — Add disableNativeComponentFrames flag (#20364) · react/react@555eeae
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/shared/ReactComponentStackFrame.js +5-2Lines changed: 5 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | import type {Source} from 'shared/ReactElementType'; | 11 | 11 | import type {LazyComponent} from 'react/src/ReactLazy'; | 12 | 12 |
| 13 | | -import {enableComponentStackLocations} from 'shared/ReactFeatureFlags'; | | 13 | +import { | | 14 | + enableComponentStackLocations, | | 15 | + disableNativeComponentFrames, | | 16 | +} from 'shared/ReactFeatureFlags'; | 14 | 17 |
| 15 | 18 | import { | 16 | 19 | REACT_SUSPENSE_TYPE, | @@ -65,7 +68,7 @@ export function describeNativeComponentFrame( | 65 | 68 | construct: boolean, | 66 | 69 | ): string { | 67 | 70 | // If something asked for a stack inside a fake render, it should get ignored. | 68 | | - if (!fn || reentry) { | | 71 | + if (disableNativeComponentFrames || !fn || reentry) { | 69 | 72 | return ''; | 70 | 73 | } | 71 | 74 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/ReactFeatureFlags.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -98,6 +98,8 @@ export const enableComponentStackLocations = true; | 98 | 98 |
| 99 | 99 | export const enableNewReconciler = false; | 100 | 100 |
| | 101 | +export const disableNativeComponentFrames = false; | | 102 | + | 101 | 103 | // -------------------------- | 102 | 104 | // Future APIs to be deprecated | 103 | 105 | // -------------------------- | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.native-fb.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -44,6 +44,7 @@ export const warnAboutSpreadingKeyToJSX = false; | 44 | 44 | export const enableComponentStackLocations = false; | 45 | 45 | export const enableLegacyFBSupport = false; | 46 | 46 | export const enableFilterEmptyStringAttributesDOM = false; | | 47 | +export const disableNativeComponentFrames = false; | 47 | 48 |
| 48 | 49 | export const enableNewReconciler = false; | 49 | 50 | export const deferRenderPhaseUpdateToNextBatch = true; | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.native-oss.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,6 +43,7 @@ export const warnAboutSpreadingKeyToJSX = false; | 43 | 43 | export const enableComponentStackLocations = false; | 44 | 44 | export const enableLegacyFBSupport = false; | 45 | 45 | export const enableFilterEmptyStringAttributesDOM = false; | | 46 | +export const disableNativeComponentFrames = false; | 46 | 47 |
| 47 | 48 | export const enableNewReconciler = false; | 48 | 49 | export const deferRenderPhaseUpdateToNextBatch = true; | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,6 +43,7 @@ export const warnAboutSpreadingKeyToJSX = false; | 43 | 43 | export const enableComponentStackLocations = true; | 44 | 44 | export const enableLegacyFBSupport = false; | 45 | 45 | export const enableFilterEmptyStringAttributesDOM = false; | | 46 | +export const disableNativeComponentFrames = false; | 46 | 47 |
| 47 | 48 | export const enableNewReconciler = false; | 48 | 49 | export const deferRenderPhaseUpdateToNextBatch = true; | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.native.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,6 +43,7 @@ export const warnAboutSpreadingKeyToJSX = false; | 43 | 43 | export const enableComponentStackLocations = false; | 44 | 44 | export const enableLegacyFBSupport = false; | 45 | 45 | export const enableFilterEmptyStringAttributesDOM = false; | | 46 | +export const disableNativeComponentFrames = false; | 46 | 47 |
| 47 | 48 | export const enableNewReconciler = false; | 48 | 49 | export const deferRenderPhaseUpdateToNextBatch = true; | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.www.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,6 +43,7 @@ export const warnAboutSpreadingKeyToJSX = false; | 43 | 43 | export const enableComponentStackLocations = true; | 44 | 44 | export const enableLegacyFBSupport = false; | 45 | 45 | export const enableFilterEmptyStringAttributesDOM = false; | | 46 | +export const disableNativeComponentFrames = false; | 46 | 47 |
| 47 | 48 | export const enableNewReconciler = false; | 48 | 49 | export const deferRenderPhaseUpdateToNextBatch = true; | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.testing.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,6 +43,7 @@ export const warnAboutSpreadingKeyToJSX = false; | 43 | 43 | export const enableComponentStackLocations = true; | 44 | 44 | export const enableLegacyFBSupport = false; | 45 | 45 | export const enableFilterEmptyStringAttributesDOM = false; | | 46 | +export const disableNativeComponentFrames = false; | 46 | 47 |
| 47 | 48 | export const enableNewReconciler = false; | 48 | 49 | export const deferRenderPhaseUpdateToNextBatch = true; | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.testing.www.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,6 +43,7 @@ export const warnAboutSpreadingKeyToJSX = false; | 43 | 43 | export const enableComponentStackLocations = true; | 44 | 44 | export const enableLegacyFBSupport = !__EXPERIMENTAL__; | 45 | 45 | export const enableFilterEmptyStringAttributesDOM = false; | | 46 | +export const disableNativeComponentFrames = false; | 46 | 47 |
| 47 | 48 | export const enableNewReconciler = false; | 48 | 49 | export const deferRenderPhaseUpdateToNextBatch = true; | |
Collapse file Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.www-dynamic.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -47,6 +47,7 @@ export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; | 47 | 47 | // to __VARIANT__. | 48 | 48 | export const enableTrustedTypesIntegration = false; | 49 | 49 | export const disableSchedulerTimeoutBasedOnReactExpirationTime = false; | | 50 | +export const disableNativeComponentFrames = false; | 50 | 51 |
| 51 | 52 | export const enableDoubleInvokingEffects = false; | 52 | 53 | export const enableUseRefAccessWarning = __VARIANT__; | |
|