@samitouri / QOS-React / commits / b5ac963fb7

Push host root context when bailing out on low priority (#10712)

Prevents a push/pop mismatch when bailing out on HostRoots. This is currently unobservable, because HostRoots never bail out on low priority, but this does happen with prerendering. I found this when rebasing #10624 on top of master.

Andrew Clark committed Sep 14, 2017 at 15:23 UTC b5ac963fb791d1298e7f396236383bc955f916c1
1 file changed +3
src/renderers/shared/fiber/ReactFiberBeginWork.js
+3
@@ -686,6 +686,9 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
686 // TODO: Handle HostComponent tags here as well and call pushHostContext()?
687 // See PR 8590 discussion for context
688 switch (workInProgress.tag) {
689 + case HostRoot:
690 + pushHostRootContext(workInProgress);
691 + break;
692 case ClassComponent:
693 pushContextProvider(workInProgress);
694 break;