(workInProgress)
| 12294 | var previousContext = emptyObject; |
| 12295 | |
| 12296 | function getUnmaskedContext(workInProgress) { |
| 12297 | var hasOwnContext = isContextProvider(workInProgress); |
| 12298 | if (hasOwnContext) { |
| 12299 | // If the fiber is a context provider itself, when we read its context |
| 12300 | // we have already pushed its own child context on the stack. A context |
| 12301 | // provider should not "see" its own child context. Therefore we read the |
| 12302 | // previous (parent) context instead for a context provider. |
| 12303 | return previousContext; |
| 12304 | } |
| 12305 | return contextStackCursor.current; |
| 12306 | } |
| 12307 | |
| 12308 | function cacheContext(workInProgress, unmaskedContext, maskedContext) { |
| 12309 | var instance = workInProgress.stateNode; |
no test coverage detected