{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/8568","repository_url":"https://api.github.com/repos/facebook/react","labels_url":"https://api.github.com/repos/facebook/react/issues/8568/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/8568/comments","events_url":"https://api.github.com/repos/facebook/react/issues/8568/events","html_url":"https://github.com/facebook/react/pull/8568","id":195353413,"number":8568,"title":"HostRoot no longer pops context provider during complete phase","user":{"login":"bvaughn","id":29597,"avatar_url":"https://avatars.githubusercontent.com/u/29597?v=3","gravatar_id":"","url":"https://api.github.com/users/bvaughn","html_url":"https://github.com/bvaughn","followers_url":"https://api.github.com/users/bvaughn/followers","following_url":"https://api.github.com/users/bvaughn/following{/other_user}","gists_url":"https://api.github.com/users/bvaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/bvaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvaughn/subscriptions","organizations_url":"https://api.github.com/users/bvaughn/orgs","repos_url":"https://api.github.com/users/bvaughn/repos","events_url":"https://api.github.com/users/bvaughn/events{/privacy}","received_events_url":"https://api.github.com/users/bvaughn/received_events","type":"User","site_admin":false},"labels":[{"id":130714623,"url":"https://api.github.com/repos/facebook/react/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars.githubusercontent.com/u/63648?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"assignees":[{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars.githubusercontent.com/u/63648?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-12-13T20:02:12Z","updated_at":"2016-12-13T20:12:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/8568","html_url":"https://github.com/facebook/react/pull/8568","diff_url":"https://github.com/facebook/react/pull/8568.diff","patch_url":"https://github.com/facebook/react/pull/8568.patch"},"body":"In the begin work phase, we call `pushContextProvider` for `ClassComponent`s. In the complete work phase, we call `popContextProvider` for both `ClassComponent`s and `HostRoot`s. The result is that we end up popping more times than we should.\r\n\r\nThis PR removes the `popContextProvider` call for `HostRoot` and adds an invariant warning to `popContextProvider` as well.\r\n\r\nNote that no new tests fail with the new invariant warning once the superfluous `popContextProvider` call is removed. (Several fail with it in place.)\r\n\r\nNote also that in the begin work phase we call `pushHostContainer` for `HostRoot`s and `HostPortal`s but we only call `popHostContainer` for `HostPortal`s during the complete work phase. It seems like we should align these calls as well but I don't have enough context to tackle that yet."},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/266848256","html_url":"https://github.com/facebook/react/pull/8568#issuecomment-266848256","issue_url":"https://api.github.com/repos/facebook/react/issues/8568","id":266848256,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T20:12:49Z","updated_at":"2016-12-13T20:12:49Z","body":">Note also that in the begin work phase we call pushHostContainer for HostRoots and HostPortals but we only call popHostContainer for HostPortals during the complete work phase.\r\n\r\nIf I recall correctly I needed the host container to still exist during the commit phase [for this](https://github.com/facebook/react/blob/369769aed429aebc159ff80ec3ab2a3ebbe695d0/src/renderers/shared/fiber/ReactFiberCommitWork.js#L375). However now that I think of it we would get the wrong one in the portal (root instead of portal root) so it's likely a bug. Can you figure out a failing test for this?"}}
{"actor":{"display_login":"gaearon"}}