(workInProgress)
| 12387 | var previousContext = emptyObject; |
| 12388 | |
| 12389 | function getUnmaskedContext(workInProgress) { |
| 12390 | var hasOwnContext = isContextProvider(workInProgress); |
| 12391 | if (hasOwnContext) { |
| 12392 | // If the fiber is a context provider itself, when we read its context |
| 12393 | // we have already pushed its own child context on the stack. A context |
| 12394 | // provider should not "see" its own child context. Therefore we read the |
| 12395 | // previous (parent) context instead for a context provider. |
| 12396 | return previousContext; |
| 12397 | } |
| 12398 | return contextStackCursor.current; |
| 12399 | } |
| 12400 | |
| 12401 | function cacheContext(workInProgress, unmaskedContext, maskedContext) { |
| 12402 | var instance = workInProgress.stateNode; |
no test coverage detected