(fiber, nextRootInstance)
| 14551 | } |
| 14552 | |
| 14553 | function pushHostContainer(fiber, nextRootInstance) { |
| 14554 | // Push current root instance onto the stack; |
| 14555 | // This allows us to reset root when portals are popped. |
| 14556 | push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. |
| 14557 | // This enables us to pop only Fibers that provide unique contexts. |
| 14558 | |
| 14559 | push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. |
| 14560 | // However, we can't just call getRootHostContext() and push it because |
| 14561 | // we'd have a different number of entries on the stack depending on |
| 14562 | // whether getRootHostContext() throws somewhere in renderer code or not. |
| 14563 | // So we push an empty value first. This lets us safely unwind on errors. |
| 14564 | |
| 14565 | push(contextStackCursor$1, NO_CONTEXT, fiber); |
| 14566 | var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. |
| 14567 | |
| 14568 | pop(contextStackCursor$1, fiber); |
| 14569 | push(contextStackCursor$1, nextRootContext, fiber); |
| 14570 | } |
| 14571 | |
| 14572 | function popHostContainer(fiber) { |
| 14573 | pop(contextStackCursor$1, fiber); |
no test coverage detected