{"action":"opened","number":228,"pull_request":{"url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/228","id":85841669,"html_url":"https://github.com/xamarin/xamarin-android/pull/228","diff_url":"https://github.com/xamarin/xamarin-android/pull/228.diff","patch_url":"https://github.com/xamarin/xamarin-android/pull/228.patch","issue_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/228","number":228,"state":"open","locked":false,"title":"[jni] Refresh current domain after attaching thread to runtime when registering types.","user":{"login":"garuma","id":104105,"avatar_url":"https://avatars.githubusercontent.com/u/104105?v=3","gravatar_id":"","url":"https://api.github.com/users/garuma","html_url":"https://github.com/garuma","followers_url":"https://api.github.com/users/garuma/followers","following_url":"https://api.github.com/users/garuma/following{/other_user}","gists_url":"https://api.github.com/users/garuma/gists{/gist_id}","starred_url":"https://api.github.com/users/garuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garuma/subscriptions","organizations_url":"https://api.github.com/users/garuma/orgs","repos_url":"https://api.github.com/users/garuma/repos","events_url":"https://api.github.com/users/garuma/events{/privacy}","received_events_url":"https://api.github.com/users/garuma/received_events","type":"User","site_admin":false},"body":"Change triggered by https://bugzilla.xamarin.com/show_bug.cgi?id=44448\r\n\r\nIt's possible for the register call to be called on a thread that hasn't been registered with Mono yet. As such, the `mono_domain_get` call will return NULL until `mono_jit_thread_attach` is invoked where domain information for the current thread becomes correct.\r\n\r\nThis is an issue because it means we invoke `monodroid_runtime_invoke` passing NULL as a bogus domain argument. This caused a crash with `mono_domain_set` as it doesn't support being passed a NULL domain.\r\n\r\nThis commit solves the problem by re-requesting the current domain after the `mono_jit_thread_attach` call. If the thread had been registered beforehand, this will essentially be a no-op as it should return the same domain again. If it hadn't, attaching the thread will have set the current domain to be the root appdomain which will be returned by `mono_domain_get` making our current domain variable now valid.","created_at":"2016-09-19T18:08:34Z","updated_at":"2016-09-19T18:08:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/228/commits","review_comments_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/228/comments","review_comment_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/228/comments","statuses_url":"https://api.github.com/repos/xamarin/xamarin-android/statuses/492ed85d95980a45c0cb03220b2d306553c900e0","head":{"label":"xamarin:libmonodroid-update-domain","ref":"libmonodroid-update-domain","sha":"492ed85d95980a45c0cb03220b2d306553c900e0","user":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"repo":{"id":55075302,"name":"xamarin-android","full_name":"xamarin/xamarin-android","owner":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xamarin/xamarin-android","description":"","fork":false,"url":"https://api.github.com/repos/xamarin/xamarin-android","forks_url":"https://api.github.com/repos/xamarin/xamarin-android/forks","keys_url":"https://api.github.com/repos/xamarin/xamarin-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xamarin/xamarin-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xamarin/xamarin-android/teams","hooks_url":"https://api.github.com/repos/xamarin/xamarin-android/hooks","issue_events_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/events{/number}","events_url":"https://api.github.com/repos/xamarin/xamarin-android/events","assignees_url":"https://api.github.com/repos/xamarin/xamarin-android/assignees{/user}","branches_url":"https://api.github.com/repos/xamarin/xamarin-android/branches{/branch}","tags_url":"https://api.github.com/repos/xamarin/xamarin-android/tags","blobs_url":"https://api.github.com/repos/xamarin/xamarin-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xamarin/xamarin-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xamarin/xamarin-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/xamarin/xamarin-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xamarin/xamarin-android/statuses/{sha}","languages_url":"https://api.github.com/repos/xamarin/xamarin-android/languages","stargazers_url":"https://api.github.com/repos/xamarin/xamarin-android/stargazers","contributors_url":"https://api.github.com/repos/xamarin/xamarin-android/contributors","subscribers_url":"https://api.github.com/repos/xamarin/xamarin-android/subscribers","subscription_url":"https://api.github.com/repos/xamarin/xamarin-android/subscription","commits_url":"https://api.github.com/repos/xamarin/xamarin-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/xamarin/xamarin-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/xamarin/xamarin-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/xamarin/xamarin-android/contents/{+path}","compare_url":"https://api.github.com/repos/xamarin/xamarin-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xamarin/xamarin-android/merges","archive_url":"https://api.github.com/repos/xamarin/xamarin-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xamarin/xamarin-android/downloads","issues_url":"https://api.github.com/repos/xamarin/xamarin-android/issues{/number}","pulls_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls{/number}","milestones_url":"https://api.github.com/repos/xamarin/xamarin-android/milestones{/number}","notifications_url":"https://api.github.com/repos/xamarin/xamarin-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xamarin/xamarin-android/labels{/name}","releases_url":"https://api.github.com/repos/xamarin/xamarin-android/releases{/id}","deployments_url":"https://api.github.com/repos/xamarin/xamarin-android/deployments","created_at":"2016-03-30T15:37:14Z","updated_at":"2016-09-19T07:55:18Z","pushed_at":"2016-09-19T18:08:34Z","git_url":"git://github.com/xamarin/xamarin-android.git","ssh_url":"git@github.com:xamarin/xamarin-android.git","clone_url":"https://github.com/xamarin/xamarin-android.git","svn_url":"https://github.com/xamarin/xamarin-android","homepage":null,"size":5239,"stargazers_count":609,"watchers_count":609,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":8,"forks":139,"open_issues":8,"watchers":609,"default_branch":"master"}},"base":{"label":"xamarin:master","ref":"master","sha":"9e47956bcc2e0bb948019919bcef92be48497e6e","user":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"repo":{"id":55075302,"name":"xamarin-android","full_name":"xamarin/xamarin-android","owner":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xamarin/xamarin-android","description":"","fork":false,"url":"https://api.github.com/repos/xamarin/xamarin-android","forks_url":"https://api.github.com/repos/xamarin/xamarin-android/forks","keys_url":"https://api.github.com/repos/xamarin/xamarin-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xamarin/xamarin-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xamarin/xamarin-android/teams","hooks_url":"https://api.github.com/repos/xamarin/xamarin-android/hooks","issue_events_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/events{/number}","events_url":"https://api.github.com/repos/xamarin/xamarin-android/events","assignees_url":"https://api.github.com/repos/xamarin/xamarin-android/assignees{/user}","branches_url":"https://api.github.com/repos/xamarin/xamarin-android/branches{/branch}","tags_url":"https://api.github.com/repos/xamarin/xamarin-android/tags","blobs_url":"https://api.github.com/repos/xamarin/xamarin-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xamarin/xamarin-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xamarin/xamarin-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/xamarin/xamarin-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xamarin/xamarin-android/statuses/{sha}","languages_url":"https://api.github.com/repos/xamarin/xamarin-android/languages","stargazers_url":"https://api.github.com/repos/xamarin/xamarin-android/stargazers","contributors_url":"https://api.github.com/repos/xamarin/xamarin-android/contributors","subscribers_url":"https://api.github.com/repos/xamarin/xamarin-android/subscribers","subscription_url":"https://api.github.com/repos/xamarin/xamarin-android/subscription","commits_url":"https://api.github.com/repos/xamarin/xamarin-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/xamarin/xamarin-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/xamarin/xamarin-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/xamarin/xamarin-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/xamarin/xamarin-android/contents/{+path}","compare_url":"https://api.github.com/repos/xamarin/xamarin-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xamarin/xamarin-android/merges","archive_url":"https://api.github.com/repos/xamarin/xamarin-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xamarin/xamarin-android/downloads","issues_url":"https://api.github.com/repos/xamarin/xamarin-android/issues{/number}","pulls_url":"https://api.github.com/repos/xamarin/xamarin-android/pulls{/number}","milestones_url":"https://api.github.com/repos/xamarin/xamarin-android/milestones{/number}","notifications_url":"https://api.github.com/repos/xamarin/xamarin-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xamarin/xamarin-android/labels{/name}","releases_url":"https://api.github.com/repos/xamarin/xamarin-android/releases{/id}","deployments_url":"https://api.github.com/repos/xamarin/xamarin-android/deployments","created_at":"2016-03-30T15:37:14Z","updated_at":"2016-09-19T07:55:18Z","pushed_at":"2016-09-19T18:08:34Z","git_url":"git://github.com/xamarin/xamarin-android.git","ssh_url":"git@github.com:xamarin/xamarin-android.git","clone_url":"https://github.com/xamarin/xamarin-android.git","svn_url":"https://github.com/xamarin/xamarin-android","homepage":null,"size":5239,"stargazers_count":609,"watchers_count":609,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":8,"forks":139,"open_issues":8,"watchers":609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/228"},"html":{"href":"https://github.com/xamarin/xamarin-android/pull/228"},"issue":{"href":"https://api.github.com/repos/xamarin/xamarin-android/issues/228"},"comments":{"href":"https://api.github.com/repos/xamarin/xamarin-android/issues/228/comments"},"review_comments":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/228/comments"},"review_comment":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xamarin/xamarin-android/pulls/228/commits"},"statuses":{"href":"https://api.github.com/repos/xamarin/xamarin-android/statuses/492ed85d95980a45c0cb03220b2d306553c900e0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"garuma"}}