(task: Task, request: Request, error: mixed)
| 4875 | } |
| 4876 | |
| 4877 | function abortTaskDEV(task: Task, request: Request, error: mixed): void { |
| 4878 | if (__DEV__) { |
| 4879 | const prevTaskInDEV = currentTaskInDEV; |
| 4880 | const prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack; |
| 4881 | setCurrentTaskInDEV(task); |
| 4882 | ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; |
| 4883 | try { |
| 4884 | abortTask(task, request, error); |
| 4885 | } finally { |
| 4886 | setCurrentTaskInDEV(prevTaskInDEV); |
| 4887 | ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl; |
| 4888 | } |
| 4889 | } else { |
| 4890 | // These errors should never make it into a build so we don't need to encode them in codes.json |
| 4891 | // eslint-disable-next-line react-internal/prod-error-codes |
| 4892 | throw new Error( |
| 4893 | 'abortTaskDEV should never be called in production mode. This is a bug in React.', |
| 4894 | ); |
| 4895 | } |
| 4896 | } |
| 4897 | |
| 4898 | function safelyEmitEarlyPreloads( |
| 4899 | request: Request, |
no test coverage detected