(workInProgress, didChange)
| 12479 | } |
| 12480 | |
| 12481 | function invalidateContextProvider(workInProgress, didChange) { |
| 12482 | var instance = workInProgress.stateNode; |
| 12483 | !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; |
| 12484 | |
| 12485 | if (didChange) { |
| 12486 | // Merge parent and own context. |
| 12487 | // Skip this if we're not updating due to sCU. |
| 12488 | // This avoids unnecessarily recomputing memoized values. |
| 12489 | var mergedContext = processChildContext(workInProgress, previousContext); |
| 12490 | instance.__reactInternalMemoizedMergedChildContext = mergedContext; |
| 12491 | |
| 12492 | // Replace the old (or empty) context with the new one. |
| 12493 | // It is important to unwind the context in the reverse order. |
| 12494 | pop(didPerformWorkStackCursor, workInProgress); |
| 12495 | pop(contextStackCursor, workInProgress); |
| 12496 | // Now push the new context and mark that it has changed. |
| 12497 | push(contextStackCursor, mergedContext, workInProgress); |
| 12498 | push(didPerformWorkStackCursor, didChange, workInProgress); |
| 12499 | } else { |
| 12500 | pop(didPerformWorkStackCursor, workInProgress); |
| 12501 | push(didPerformWorkStackCursor, didChange, workInProgress); |
| 12502 | } |
| 12503 | } |
| 12504 | |
| 12505 | function findCurrentUnmaskedContext(fiber) { |
| 12506 | // Currently this is only used with renderSubtreeIntoContainer; not sure if it |
no test coverage detected