(workInProgress, renderExpirationTime)
| 7837 | |
| 7838 | // Invokes the mount life-cycles on a previously never rendered instance. |
| 7839 | function mountClassInstance(workInProgress, renderExpirationTime) { |
| 7840 | var ctor = workInProgress.type; |
| 7841 | var current = workInProgress.alternate; |
| 7842 | |
| 7843 | { |
| 7844 | checkClassInstance(workInProgress); |
| 7845 | } |
| 7846 | |
| 7847 | var instance = workInProgress.stateNode; |
| 7848 | var props = workInProgress.pendingProps; |
| 7849 | var unmaskedContext = getUnmaskedContext(workInProgress); |
| 7850 | |
| 7851 | instance.props = props; |
| 7852 | instance.state = workInProgress.memoizedState; |
| 7853 | instance.refs = emptyObject; |
| 7854 | instance.context = getMaskedContext(workInProgress, unmaskedContext); |
| 7855 | |
| 7856 | { |
| 7857 | if (workInProgress.mode & StrictMode) { |
| 7858 | ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); |
| 7859 | } |
| 7860 | |
| 7861 | if (warnAboutDeprecatedLifecycles) { |
| 7862 | ReactStrictModeWarnings.recordDeprecationWarnings(workInProgress, instance); |
| 7863 | } |
| 7864 | } |
| 7865 | |
| 7866 | // In order to support react-lifecycles-compat polyfilled components, |
| 7867 | // Unsafe lifecycles should not be invoked for any component with the new gDSFP. |
| 7868 | if ((typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function') && typeof ctor.getDerivedStateFromProps !== 'function') { |
| 7869 | callComponentWillMount(workInProgress, instance); |
| 7870 | // If we had additional state updates during this life-cycle, let's |
| 7871 | // process them now. |
| 7872 | var updateQueue = workInProgress.updateQueue; |
| 7873 | if (updateQueue !== null) { |
| 7874 | instance.state = processUpdateQueue(current, workInProgress, updateQueue, instance, props, renderExpirationTime); |
| 7875 | } |
| 7876 | } |
| 7877 | if (typeof instance.componentDidMount === 'function') { |
| 7878 | workInProgress.effectTag |= Update; |
| 7879 | } |
| 7880 | } |
| 7881 | |
| 7882 | function resumeMountClassInstance(workInProgress, renderExpirationTime) { |
| 7883 | var ctor = workInProgress.type; |
no test coverage detected