(workInProgress, didChange)
| 11677 | } |
| 11678 | |
| 11679 | function invalidateContextProvider(workInProgress, didChange) { |
| 11680 | var instance = workInProgress.stateNode; |
| 11681 | !instance ? invariant(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0; |
| 11682 | |
| 11683 | if (didChange) { |
| 11684 | // Merge parent and own context. |
| 11685 | // Skip this if we're not updating due to sCU. |
| 11686 | // This avoids unnecessarily recomputing memoized values. |
| 11687 | var mergedContext = processChildContext(workInProgress, previousContext); |
| 11688 | instance.__reactInternalMemoizedMergedChildContext = mergedContext; |
| 11689 | |
| 11690 | // Replace the old (or empty) context with the new one. |
| 11691 | // It is important to unwind the context in the reverse order. |
| 11692 | pop(didPerformWorkStackCursor, workInProgress); |
| 11693 | pop(contextStackCursor, workInProgress); |
| 11694 | // Now push the new context and mark that it has changed. |
| 11695 | push(contextStackCursor, mergedContext, workInProgress); |
| 11696 | push(didPerformWorkStackCursor, didChange, workInProgress); |
| 11697 | } else { |
| 11698 | pop(didPerformWorkStackCursor, workInProgress); |
| 11699 | push(didPerformWorkStackCursor, didChange, workInProgress); |
| 11700 | } |
| 11701 | } |
| 11702 | |
| 11703 | function findCurrentUnmaskedContext(fiber) { |
| 11704 | // Currently this is only used with renderSubtreeIntoContainer; not sure if it |
no test coverage detected