(workInProgress, didChange)
| 11805 | } |
| 11806 | |
| 11807 | function invalidateContextProvider(workInProgress, didChange) { |
| 11808 | var instance = workInProgress.stateNode; |
| 11809 | !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; |
| 11810 | |
| 11811 | if (didChange) { |
| 11812 | // Merge parent and own context. |
| 11813 | // Skip this if we're not updating due to sCU. |
| 11814 | // This avoids unnecessarily recomputing memoized values. |
| 11815 | var mergedContext = processChildContext(workInProgress, previousContext); |
| 11816 | instance.__reactInternalMemoizedMergedChildContext = mergedContext; |
| 11817 | |
| 11818 | // Replace the old (or empty) context with the new one. |
| 11819 | // It is important to unwind the context in the reverse order. |
| 11820 | pop(didPerformWorkStackCursor, workInProgress); |
| 11821 | pop(contextStackCursor, workInProgress); |
| 11822 | // Now push the new context and mark that it has changed. |
| 11823 | push(contextStackCursor, mergedContext, workInProgress); |
| 11824 | push(didPerformWorkStackCursor, didChange, workInProgress); |
| 11825 | } else { |
| 11826 | pop(didPerformWorkStackCursor, workInProgress); |
| 11827 | push(didPerformWorkStackCursor, didChange, workInProgress); |
| 11828 | } |
| 11829 | } |
| 11830 | |
| 11831 | function findCurrentUnmaskedContext(fiber) { |
| 11832 | // Currently this is only used with renderSubtreeIntoContainer; not sure if it |
no test coverage detected