(fiber, nextRootInstance)
| 18111 | } |
| 18112 | |
| 18113 | function pushHostContainer(fiber, nextRootInstance) { |
| 18114 | // Push current root instance onto the stack; |
| 18115 | // This allows us to reset root when portals are popped. |
| 18116 | push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. |
| 18117 | // This enables us to pop only Fibers that provide unique contexts. |
| 18118 | |
| 18119 | push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. |
| 18120 | // However, we can't just call getRootHostContext() and push it because |
| 18121 | // we'd have a different number of entries on the stack depending on |
| 18122 | // whether getRootHostContext() throws somewhere in renderer code or not. |
| 18123 | // So we push an empty value first. This lets us safely unwind on errors. |
| 18124 | |
| 18125 | push(contextStackCursor$1, NO_CONTEXT, fiber); |
| 18126 | var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. |
| 18127 | |
| 18128 | pop(contextStackCursor$1, fiber); |
| 18129 | push(contextStackCursor$1, nextRootContext, fiber); |
| 18130 | } |
| 18131 | |
| 18132 | function popHostContainer(fiber) { |
| 18133 | pop(contextStackCursor$1, fiber); |
no test coverage detected