(workInProgress)
| 11527 | var previousContext = emptyObject; |
| 11528 | |
| 11529 | function getUnmaskedContext(workInProgress) { |
| 11530 | var hasOwnContext = isContextProvider(workInProgress); |
| 11531 | if (hasOwnContext) { |
| 11532 | // If the fiber is a context provider itself, when we read its context |
| 11533 | // we have already pushed its own child context on the stack. A context |
| 11534 | // provider should not "see" its own child context. Therefore we read the |
| 11535 | // previous (parent) context instead for a context provider. |
| 11536 | return previousContext; |
| 11537 | } |
| 11538 | return contextStackCursor.current; |
| 11539 | } |
| 11540 | |
| 11541 | function cacheContext(workInProgress, unmaskedContext, maskedContext) { |
| 11542 | var instance = workInProgress.stateNode; |
no test coverage detected