(workInProgress, renderExpirationTime)
| 8651 | |
| 8652 | // Invokes the mount life-cycles on a previously never rendered instance. |
| 8653 | function mountClassInstance(workInProgress, renderExpirationTime) { |
| 8654 | var ctor = workInProgress.type; |
| 8655 | var current = workInProgress.alternate; |
| 8656 | |
| 8657 | { |
| 8658 | checkClassInstance(workInProgress); |
| 8659 | } |
| 8660 | |
| 8661 | var instance = workInProgress.stateNode; |
| 8662 | var props = workInProgress.pendingProps; |
| 8663 | var unmaskedContext = getUnmaskedContext(workInProgress); |
| 8664 | |
| 8665 | instance.props = props; |
| 8666 | instance.state = workInProgress.memoizedState; |
| 8667 | instance.refs = emptyObject; |
| 8668 | instance.context = getMaskedContext(workInProgress, unmaskedContext); |
| 8669 | |
| 8670 | { |
| 8671 | if (workInProgress.mode & StrictMode) { |
| 8672 | ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); |
| 8673 | } |
| 8674 | |
| 8675 | if (warnAboutDeprecatedLifecycles) { |
| 8676 | ReactStrictModeWarnings.recordDeprecationWarnings(workInProgress, instance); |
| 8677 | } |
| 8678 | } |
| 8679 | |
| 8680 | // In order to support react-lifecycles-compat polyfilled components, |
| 8681 | // Unsafe lifecycles should not be invoked for any component with the new gDSFP. |
| 8682 | if ((typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function') && typeof ctor.getDerivedStateFromProps !== 'function') { |
| 8683 | callComponentWillMount(workInProgress, instance); |
| 8684 | // If we had additional state updates during this life-cycle, let's |
| 8685 | // process them now. |
| 8686 | var updateQueue = workInProgress.updateQueue; |
| 8687 | if (updateQueue !== null) { |
| 8688 | instance.state = processUpdateQueue(current, workInProgress, updateQueue, instance, props, renderExpirationTime); |
| 8689 | } |
| 8690 | } |
| 8691 | if (typeof instance.componentDidMount === 'function') { |
| 8692 | workInProgress.effectTag |= Update; |
| 8693 | } |
| 8694 | } |
| 8695 | |
| 8696 | function resumeMountClassInstance(workInProgress, renderExpirationTime) { |
| 8697 | var ctor = workInProgress.type; |
no test coverage detected