{"action":"closed","number":13994,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/13994","id":120769102,"html_url":"https://github.com/facebook/react-native/pull/13994","diff_url":"https://github.com/facebook/react-native/pull/13994.diff","patch_url":"https://github.com/facebook/react-native/pull/13994.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/13994","number":13994,"state":"closed","locked":false,"title":"Make ShadowNodeRegistry thread safe","user":{"login":"bood","id":1168942,"avatar_url":"https://avatars3.githubusercontent.com/u/1168942?v=4","gravatar_id":"","url":"https://api.github.com/users/bood","html_url":"https://github.com/bood","followers_url":"https://api.github.com/users/bood/followers","following_url":"https://api.github.com/users/bood/following{/other_user}","gists_url":"https://api.github.com/users/bood/gists{/gist_id}","starred_url":"https://api.github.com/users/bood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bood/subscriptions","organizations_url":"https://api.github.com/users/bood/orgs","repos_url":"https://api.github.com/users/bood/repos","events_url":"https://api.github.com/users/bood/events{/privacy}","received_events_url":"https://api.github.com/users/bood/received_events","type":"User","site_admin":false},"body":"## Motivation (required)\r\n\r\nAs noted in `TODO` of `addRootNode`, ShadowNodeRegistry can be accessed by\r\nmultiple threads. Make it thread safe can avoid crashes in\r\n`UIImplementation` module (e.g. tag cannot be found).\r\n\r\nFixes #11524 and #10755.\r\n\r\nExample of crash stack (0.44.0):\r\n```\r\nCaused by java.lang.NullPointerException: Attempt to invoke virtual method 'void com.facebook.react.uimanager.ReactShadowNode.addChildAt(com.facebook.react.uimanager.ReactShadowNode, int)' on a null object reference\r\n       at com.facebook.react.uimanager.UIImplementation.setChildren(UIImplementation.java:390)\r\n       at com.facebook.react.uimanager.UIManagerModule.setChildren(UIManagerModule.java:313)\r\n       at java.lang.reflect.Method.invoke(Method.java)\r\n       at java.lang.reflect.Method.invoke(Method.java:372)\r\n       at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:368)\r\n       at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:138)\r\n       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)\r\n       at android.os.Handler.handleCallback(Handler.java:739)\r\n       at android.os.Handler.dispatchMessage(Handler.java:95)\r\n       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)\r\n       at android.os.Looper.loop(Looper.java:145)\r\n       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:208)\r\n       at java.lang.Thread.run(Thread.java:818)\r\n```\r\n\r\n## Test Plan (required)\r\n\r\nCrash can be re-produced by monkey test. After the fix applied, related crashes are never seen again.\r\n","created_at":"2017-05-16T08:19:43Z","updated_at":"2017-11-11T04:22:06Z","closed_at":"2017-11-11T04:22:06Z","merged_at":null,"merge_commit_sha":"de330059f1ebfa269a6634f48b01d853f8683c44","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/13994/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/13994/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/13994/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/46e74ac80c3a5e99c73516fddabfbbc22320d436","head":{"label":"bood:android-thread-safe-fix","ref":"android-thread-safe-fix","sha":"46e74ac80c3a5e99c73516fddabfbbc22320d436","user":{"login":"bood","id":1168942,"avatar_url":"https://avatars3.githubusercontent.com/u/1168942?v=4","gravatar_id":"","url":"https://api.github.com/users/bood","html_url":"https://github.com/bood","followers_url":"https://api.github.com/users/bood/followers","following_url":"https://api.github.com/users/bood/following{/other_user}","gists_url":"https://api.github.com/users/bood/gists{/gist_id}","starred_url":"https://api.github.com/users/bood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bood/subscriptions","organizations_url":"https://api.github.com/users/bood/orgs","repos_url":"https://api.github.com/users/bood/repos","events_url":"https://api.github.com/users/bood/events{/privacy}","received_events_url":"https://api.github.com/users/bood/received_events","type":"User","site_admin":false},"repo":{"id":90987666,"name":"react-native","full_name":"bood/react-native","owner":{"login":"bood","id":1168942,"avatar_url":"https://avatars3.githubusercontent.com/u/1168942?v=4","gravatar_id":"","url":"https://api.github.com/users/bood","html_url":"https://github.com/bood","followers_url":"https://api.github.com/users/bood/followers","following_url":"https://api.github.com/users/bood/following{/other_user}","gists_url":"https://api.github.com/users/bood/gists{/gist_id}","starred_url":"https://api.github.com/users/bood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bood/subscriptions","organizations_url":"https://api.github.com/users/bood/orgs","repos_url":"https://api.github.com/users/bood/repos","events_url":"https://api.github.com/users/bood/events{/privacy}","received_events_url":"https://api.github.com/users/bood/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bood/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/bood/react-native","forks_url":"https://api.github.com/repos/bood/react-native/forks","keys_url":"https://api.github.com/repos/bood/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bood/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bood/react-native/teams","hooks_url":"https://api.github.com/repos/bood/react-native/hooks","issue_events_url":"https://api.github.com/repos/bood/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/bood/react-native/events","assignees_url":"https://api.github.com/repos/bood/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/bood/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/bood/react-native/tags","blobs_url":"https://api.github.com/repos/bood/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bood/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bood/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/bood/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bood/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/bood/react-native/languages","stargazers_url":"https://api.github.com/repos/bood/react-native/stargazers","contributors_url":"https://api.github.com/repos/bood/react-native/contributors","subscribers_url":"https://api.github.com/repos/bood/react-native/subscribers","subscription_url":"https://api.github.com/repos/bood/react-native/subscription","commits_url":"https://api.github.com/repos/bood/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/bood/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/bood/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/bood/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/bood/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/bood/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bood/react-native/merges","archive_url":"https://api.github.com/repos/bood/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bood/react-native/downloads","issues_url":"https://api.github.com/repos/bood/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/bood/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/bood/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/bood/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bood/react-native/labels{/name}","releases_url":"https://api.github.com/repos/bood/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/bood/react-native/deployments","created_at":"2017-05-11T14:20:14Z","updated_at":"2017-05-11T14:20:32Z","pushed_at":"2017-07-14T04:09:49Z","git_url":"git://github.com/bood/react-native.git","ssh_url":"git@github.com:bood/react-native.git","clone_url":"https://github.com/bood/react-native.git","svn_url":"https://github.com/bood/react-native","homepage":"http://facebook.github.io/react-native/","size":135240,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"36405d13ffc5ec25a2e0cf5d811d0fd767b0dfa5","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react-native/deployments","created_at":"2015-01-09T18:10:16Z","updated_at":"2017-11-11T04:15:28Z","pushed_at":"2017-11-11T02:06:18Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":148207,"stargazers_count":55705,"watchers_count":55705,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12975,"mirror_url":null,"archived":false,"open_issues_count":712,"forks":12975,"open_issues":712,"watchers":55705,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/13994"},"html":{"href":"https://github.com/facebook/react-native/pull/13994"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/13994"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/13994/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/13994/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/13994/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/46e74ac80c3a5e99c73516fddabfbbc22320d436"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":4,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":8,"deletions":8,"changed_files":1}}
{"actor":{"display_login":"stale"}}