()
| 25 | } |
| 26 | |
| 27 | export function resetOwnerStackLimit() { |
| 28 | if (__DEV__) { |
| 29 | const now = getCurrentTime(); |
| 30 | const timeSinceLastReset = now - lastResetTime; |
| 31 | if (timeSinceLastReset > 1000) { |
| 32 | ReactSharedInternals.recentlyCreatedOwnerStacks = 0; |
| 33 | lastResetTime = now; |
| 34 | } |
| 35 | } else { |
| 36 | // These errors should never make it into a build so we don't need to encode them in codes.json |
| 37 | // eslint-disable-next-line react-internal/prod-error-codes |
| 38 | throw new Error( |
| 39 | 'resetOwnerStackLimit should never be called in production mode. This is a bug in React.', |
| 40 | ); |
| 41 | } |
| 42 | } |
no test coverage detected