Bug fix for nil TVView on pop
Bug fix for nil TVView on pop

Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

This change is required when you try to set a focus on a view that doesn't exist and thus cannot be focused. In my specific use case, this occurred when trying to set a focus on a list item in a setInterval when the View (with the specific list item) had been popped. The while loop ran infinitely (eventually freezing the app) since the rootView doesn't exist. This adds that check and breaks out if so.

All obj-c tests ran successfully.

dlowder-salesforce
Closes https://github.com/facebook/react-native/pull/12073

Differential Revision: D4468989

Pulled By: ericvicenti

fbshipit-source-id: 7926c887035722c983c41cb6b6d9df567010c2ee

mironiasty/react-native,dikaiosune/react-native,alin23/react-native,Purii/react-native,ptomasroos/react-native,hoastoolshop/react-native,PlexChat/react-native,PlexChat/react-native,exponentjs/react-native,skevy/react-native,aljs/react-native,clozr/react-native,orenklein/react-native,tadeuzagallo/react-native,Swaagie/react-native,cdlewis/react-native,formatlos/react-native,alin23/react-native,cpunion/react-native,cdlewis/react-native,lprhodes/react-native,cdlewis/react-native,thotegowda/react-native,Maxwell2022/react-native,CodeLinkIO/react-native,hoangpham95/react-native,imjerrybao/react-native,hoangpham95/react-native,happypancake/react-native,htc2u/react-native,exponentjs/react-native,cpunion/react-native,CodeLinkIO/react-native,PlexChat/react-native,negativetwelve/react-native,DanielMSchmidt/react-native,Livyli/react-native,shrutic/react-native,kesha-antonov/react-native,chnfeeeeeef/react-native,aljs/react-native,jevakallio/react-native,Ehesp/react-native,shrutic123/react-native,brentvatne/react-native,Guardiannw/react-native,csatf/react-native,peterp/react-native,PlexChat/react-native,orenklein/react-native,csatf/react-native,Livyli/react-native,facebook/react-native,makadaw/react-native,jasonnoahchoi/react-native,tsjing/react-native,ptomasroos/react-native,exponentjs/react-native,ankitsinghania94/react-native,makadaw/react-native,tszajna0/react-native,pandiaraj44/react-native,imDangerous/react-native,tsjing/react-native,farazs/react-native,lprhodes/react-native,alin23/react-native,exponent/react-native,gilesvangruisen/react-native,alin23/react-native,skevy/react-native,Guardiannw/react-native,dikaiosune/react-native,thotegowda/react-native,janicduplessis/react-native,exponentjs/react-native,Ehesp/react-native,hammerandchisel/react-native,hoastoolshop/react-native,Swaagie/react-native,exponent/react-native,PlexChat/react-native,myntra/react-native,adamjmcgrath/react-native,dikaiosune/react-native,htc2u/react-native,shrutic123/react-native,orenklein/react-native,chnfeeeeeef/react-native,formatlos/react-native,tszajna0/react-native,CodeLinkIO/react-native,Guardiannw/react-native,makadaw/react-native,Guardiannw/react-native,thotegowda/react-native,happypancake/react-native,PlexChat/react-native,tsjing/react-native,lprhodes/react-native,jevakallio/react-native,Livyli/react-native,javache/react-native,ptmt/react-native-macos,Maxwell2022/react-native,ndejesus1227/react-native,jasonnoahchoi/react-native,DanielMSchmidt/react-native,Livyli/react-native,imjerrybao/react-native,chnfeeeeeef/react-native,rickbeerendonk/react-native,Guardiannw/react-native,negativetwelve/react-native,tadeuzagallo/react-native,hammerandchisel/react-native,PlexChat/react-native,javache/react-native,arthuralee/react-native,Swaagie/react-native,mironiasty/react-native,tadeuzagallo/react-native,makadaw/react-native,Swaagie/react-native,hammerandchisel/react-native,Ehesp/react-native,forcedotcom/react-native,cpunion/react-native,formatlos/react-native,shrutic/react-native,adamjmcgrath/react-native,ndejesus1227/react-native,makadaw/react-native,rickbeerendonk/react-native,exponentjs/react-native,Guardiannw/react-native,Maxwell2022/react-native,rickbeerendonk/react-native,orenklein/react-native,shrutic/react-native,farazs/react-native,shrutic/react-native,cdlewis/react-native,clozr/react-native,exponent/react-native,chnfeeeeeef/react-native,farazs/react-native,aljs/react-native,ptomasroos/react-native,arthuralee/react-native,CodeLinkIO/react-native,clozr/react-native,dikaiosune/react-native,mironiasty/react-native,CodeLinkIO/react-native,hoangpham95/react-native,jevakallio/react-native,kesha-antonov/react-native,imDangerous/react-native,pandiaraj44/react-native,rickbeerendonk/react-native,ankitsinghania94/react-native,DanielMSchmidt/react-native,skevy/react-native,javache/react-native,forcedotcom/react-native,janicduplessis/react-native,cdlewis/react-native,hammerandchisel/react-native,jasonnoahchoi/react-native,happypancake/react-native,cdlewis/react-native,exponent/react-native,janicduplessis/react-native,DanielMSchmidt/react-native,formatlos/react-native,cpunion/react-native,facebook/react-native,ptmt/react-native-macos,ptmt/react-native-macos,ptomasroos/react-native,rickbeerendonk/react-native,janicduplessis/react-native,clozr/react-native,frantic/react-native,tadeuzagallo/react-native,skevy/react-native,rickbeerendonk/react-native,peterp/react-native,ankitsinghania94/react-native,Guardiannw/react-native,csatf/react-native,Purii/react-native,makadaw/react-native,tadeuzagallo/react-native,jevakallio/react-native,negativetwelve/react-native,ptomasroos/react-native,jasonnoahchoi/react-native,hoangpham95/react-native,facebook/react-native,ptmt/react-native-macos,gilesvangruisen/react-native,dikaiosune/react-native,frantic/react-native,Ehesp/react-native,csatf/react-native,Bhullnatik/react-native,skevy/react-native,lprhodes/react-native,mironiasty/react-native,gilesvangruisen/react-native,thotegowda/react-native,imDangerous/react-native,negativetwelve/react-native,doochik/react-native,thotegowda/react-native,myntra/react-native,tadeuzagallo/react-native,doochik/react-native,PlexChat/react-native,adamjmcgrath/react-native,pandiaraj44/react-native,jasonnoahchoi/react-native,farazs/react-native,peterp/react-native,brentvatne/react-native,farazs/react-native,imjerrybao/react-native,forcedotcom/react-native,thotegowda/react-native,orenklein/react-native,ndejesus1227/react-native,lprhodes/react-native,hammerandchisel/react-native,ankitsinghania94/react-native,doochik/react-native,formatlos/react-native,Swaagie/react-native,tszajna0/react-native,ptmt/react-native-macos,negativetwelve/react-native,peterp/react-native,makadaw/react-native,orenklein/react-native,thotegowda/react-native,ptmt/react-native-macos,formatlos/react-native,janicduplessis/react-native,skevy/react-native,clozr/react-native,cdlewis/react-native,negativetwelve/react-native,gilesvangruisen/react-native,hoastoolshop/react-native,Bhullnatik/react-native,doochik/react-native,Bhullnatik/react-native,makadaw/react-native,imjerrybao/react-native,Purii/react-native,farazs/react-native,myntra/react-native,peterp/react-native,jasonnoahchoi/react-native,shrutic123/react-native,Bhullnatik/react-native,tszajna0/react-native,farazs/react-native,Ehesp/react-native,ndejesus1227/react-native,gilesvangruisen/react-native,Livyli/react-native,janicduplessis/react-native,mironiasty/react-native,javache/react-native,htc2u/react-native,brentvatne/react-native,thotegowda/react-native,Maxwell2022/react-native,cpunion/react-native,tadeuzagallo/react-native,shrutic123/react-native,forcedotcom/react-native,myntra/react-native,ndejesus1227/react-native,farazs/react-native,lprhodes/react-native,alin23/react-native,doochik/react-native,forcedotcom/react-native,tadeuzagallo/react-native,brentvatne/react-native,peterp/react-native,happypancake/react-native,shrutic/react-native,javache/react-native,hoastoolshop/react-native,jevakallio/react-native,gilesvangruisen/react-native,pandiaraj44/react-native,forcedotcom/react-native,Maxwell2022/react-native,csatf/react-native,frantic/react-native,pandiaraj44/react-native,adamjmcgrath/react-native,Swaagie/react-native,makadaw/react-native,kesha-antonov/react-native,formatlos/react-native,orenklein/react-native,brentvatne/react-native,Bhullnatik/react-native,jevakallio/react-native,DanielMSchmidt/react-native,jasonnoahchoi/react-native,cdlewis/react-native,shrutic123/react-native,imDangerous/react-native,kesha-antonov/react-native,aljs/react-native,adamjmcgrath/react-native,Purii/react-native,aljs/react-native,myntra/react-native,facebook/react-native,brentvatne/react-native,ndejesus1227/react-native,arthuralee/react-native,Livyli/react-native,hoastoolshop/react-native,myntra/react-native,rickbeerendonk/react-native,negativetwelve/react-native,forcedotcom/react-native,imjerrybao/react-native,doochik/react-native,Livyli/react-native,ankitsinghania94/react-native,happypancake/react-native,peterp/react-native,imDangerous/react-native,tsjing/react-native,hammerandchisel/react-native,chnfeeeeeef/react-native,alin23/react-native,kesha-antonov/react-native,javache/react-native,Maxwell2022/react-native,myntra/react-native,happypancake/react-native,DanielMSchmidt/react-native,negativetwelve/react-native,skevy/react-native,frantic/react-native,doochik/react-native,Ehesp/react-native,rickbeerendonk/react-native,adamjmcgrath/react-native,ptomasroos/react-native,Guardiannw/react-native,aljs/react-native,dikaiosune/react-native,mironiasty/react-native,hoangpham95/react-native,tsjing/react-native,htc2u/react-native,ptomasroos/react-native,alin23/react-native,cpunion/react-native,Purii/react-native,Swaagie/react-native,shrutic123/react-native,tszajna0/react-native,frantic/react-native,hoastoolshop/react-native,jevakallio/react-native,csatf/react-native,tszajna0/react-native,ankitsinghania94/react-native,htc2u/react-native,forcedotcom/react-native,aljs/react-native,htc2u/react-native,mironiasty/react-native,tsjing/react-native,javache/react-native,ankitsinghania94/react-native,arthuralee/react-native,tsjing/react-native,dikaiosune/react-native,pandiaraj44/react-native,negativetwelve/react-native,exponent/react-native,chnfeeeeeef/react-native,mironiasty/react-native,dikaiosune/react-native,peterp/react-native,CodeLinkIO/react-native,imDangerous/react-native,DanielMSchmidt/react-native,clozr/react-native,cpunion/react-native,pandiaraj44/react-native,Bhullnatik/react-native,facebook/react-native,hoangpham95/react-native,kesha-antonov/react-native,Ehesp/react-native,adamjmcgrath/react-native,hammerandchisel/react-native,Maxwell2022/react-native,Purii/react-native,Livyli/react-native,javache/react-native,ankitsinghania94/react-native,pandiaraj44/react-native,janicduplessis/react-native,ndejesus1227/react-native,clozr/react-native,kesha-antonov/react-native,shrutic/react-native,farazs/react-native,chnfeeeeeef/react-native,rickbeerendonk/react-native,kesha-antonov/react-native,doochik/react-native,hoastoolshop/react-native,shrutic/react-native,exponentjs/react-native,kesha-antonov/react-native,jevakallio/react-native,exponent/react-native,javache/react-native,myntra/react-native,formatlos/react-native,Purii/react-native,arthuralee/react-native,gilesvangruisen/react-native,brentvatne/react-native,clozr/react-native,exponent/react-native,exponent/react-native,htc2u/react-native,happypancake/react-native,chnfeeeeeef/react-native,ptomasroos/react-native,exponentjs/react-native,adamjmcgrath/react-native,shrutic/react-native,hoastoolshop/react-native,doochik/react-native,brentvatne/react-native,htc2u/react-native,aljs/react-native,CodeLinkIO/react-native,tszajna0/react-native,lprhodes/react-native,tszajna0/react-native,cdlewis/react-native,shrutic123/react-native,hoangpham95/react-native,jasonnoahchoi/react-native,Bhullnatik/react-native,skevy/react-native,Ehesp/react-native,imjerrybao/react-native,ptmt/react-native-macos,Purii/react-native,mironiasty/react-native,CodeLinkIO/react-native,hoangpham95/react-native,csatf/react-native,Bhullnatik/react-native,exponentjs/react-native,happypancake/react-native,facebook/react-native,shrutic123/react-native,janicduplessis/react-native,hammerandchisel/react-native,cpunion/react-native,ndejesus1227/react-native,jevakallio/react-native,imjerrybao/react-native,imDangerous/react-native,alin23/react-native,orenklein/react-native,csatf/react-native,imDangerous/react-native,facebook/react-native,gilesvangruisen/react-native,imjerrybao/react-native,brentvatne/react-native,Maxwell2022/react-native,Swaagie/react-native,lprhodes/react-native,DanielMSchmidt/react-native,tsjing/react-native,myntra/react-native,ptmt/react-native-macos,facebook/react-native,formatlos/react-native,facebook/react-native