(workInProgress, renderExpirationTime)
| 8386 | |
| 8387 | // Invokes the mount life-cycles on a previously never rendered instance. |
| 8388 | function mountClassInstance(workInProgress, renderExpirationTime) { |
| 8389 | var ctor = workInProgress.type; |
| 8390 | var current = workInProgress.alternate; |
| 8391 | |
| 8392 | { |
| 8393 | checkClassInstance(workInProgress); |
| 8394 | } |
| 8395 | |
| 8396 | var instance = workInProgress.stateNode; |
| 8397 | var props = workInProgress.pendingProps; |
| 8398 | var unmaskedContext = getUnmaskedContext(workInProgress); |
| 8399 | |
| 8400 | instance.props = props; |
| 8401 | instance.state = workInProgress.memoizedState; |
| 8402 | instance.refs = emptyObject; |
| 8403 | instance.context = getMaskedContext(workInProgress, unmaskedContext); |
| 8404 | |
| 8405 | { |
| 8406 | if (workInProgress.mode & StrictMode) { |
| 8407 | ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); |
| 8408 | } |
| 8409 | |
| 8410 | if (warnAboutDeprecatedLifecycles) { |
| 8411 | ReactStrictModeWarnings.recordDeprecationWarnings(workInProgress, instance); |
| 8412 | } |
| 8413 | } |
| 8414 | |
| 8415 | // In order to support react-lifecycles-compat polyfilled components, |
| 8416 | // Unsafe lifecycles should not be invoked for any component with the new gDSFP. |
| 8417 | if ((typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function') && typeof ctor.getDerivedStateFromProps !== 'function') { |
| 8418 | callComponentWillMount(workInProgress, instance); |
| 8419 | // If we had additional state updates during this life-cycle, let's |
| 8420 | // process them now. |
| 8421 | var updateQueue = workInProgress.updateQueue; |
| 8422 | if (updateQueue !== null) { |
| 8423 | instance.state = processUpdateQueue(current, workInProgress, updateQueue, instance, props, renderExpirationTime); |
| 8424 | } |
| 8425 | } |
| 8426 | if (typeof instance.componentDidMount === 'function') { |
| 8427 | workInProgress.effectTag |= Update; |
| 8428 | } |
| 8429 | } |
| 8430 | |
| 8431 | function resumeMountClassInstance(workInProgress, renderExpirationTime) { |
| 8432 | var ctor = workInProgress.type; |
no test coverage detected