(workInProgress: Fiber)
| 226 | } |
| 227 | |
| 228 | export function popTreeContext(workInProgress: Fiber) { |
| 229 | // Restore the previous values. |
| 230 | |
| 231 | // This is a bit more complicated than other context-like modules in Fiber |
| 232 | // because the same Fiber may appear on the stack multiple times and for |
| 233 | // different reasons. We have to keep popping until the work-in-progress is |
| 234 | // no longer at the top of the stack. |
| 235 | |
| 236 | while (workInProgress === treeForkProvider) { |
| 237 | treeForkProvider = forkStack[--forkStackIndex]; |
| 238 | forkStack[forkStackIndex] = null; |
| 239 | treeForkCount = forkStack[--forkStackIndex]; |
| 240 | forkStack[forkStackIndex] = null; |
| 241 | } |
| 242 | |
| 243 | while (workInProgress === treeContextProvider) { |
| 244 | treeContextProvider = idStack[--idStackIndex]; |
| 245 | idStack[idStackIndex] = null; |
| 246 | treeContextOverflow = idStack[--idStackIndex]; |
| 247 | idStack[idStackIndex] = null; |
| 248 | treeContextId = idStack[--idStackIndex]; |
| 249 | idStack[idStackIndex] = null; |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | export function getSuspendedTreeContext(): TreeContext | null { |
| 254 | warnIfNotHydrating(); |
no outgoing calls
no test coverage detected