{"action":"closed","number":13270,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/13270","id":113981126,"html_url":"https://github.com/facebook/react-native/pull/13270","diff_url":"https://github.com/facebook/react-native/pull/13270.diff","patch_url":"https://github.com/facebook/react-native/pull/13270.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/13270","number":13270,"state":"closed","locked":false,"title":"Add details what to do if sourceURLForBridge return nil","user":{"login":"makadaw","id":215670,"avatar_url":"https://avatars0.githubusercontent.com/u/215670?v=3","gravatar_id":"","url":"https://api.github.com/users/makadaw","html_url":"https://github.com/makadaw","followers_url":"https://api.github.com/users/makadaw/followers","following_url":"https://api.github.com/users/makadaw/following{/other_user}","gists_url":"https://api.github.com/users/makadaw/gists{/gist_id}","starred_url":"https://api.github.com/users/makadaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makadaw/subscriptions","organizations_url":"https://api.github.com/users/makadaw/orgs","repos_url":"https://api.github.com/users/makadaw/repos","events_url":"https://api.github.com/users/makadaw/events{/privacy}","received_events_url":"https://api.github.com/users/makadaw/received_events","type":"User","site_admin":false},"body":"- Add more comments to sourceURLForBridge method\r\n- Move source URL assert on right place in RCTJSExecutor\r\n\r\nThanks for submitting a PR! Please read these instructions carefully:\r\n\r\n- [x] Explain the **motivation** for making this change.\r\n- [x] Provide a **test plan** demonstrating that the code is solid.\r\n- [ ] Match the **code formatting** of the rest of the codebase.\r\n- [ ] Target the `master` branch, NOT a \"stable\" branch.\r\n\r\n## Motivation (required)\r\n\r\nRCTBridgeDelegate support 2 ways of JS downloading. First you can return URL (remote or file URL) with `- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge` method or download it manually with ` - (void)loadSourceForBridge:(RCTBridge *)bridge\r\nonProgress:(RCTSourceLoadProgressBlock)onProgress onComplete:(RCTSourceLoadBlock)loadCallback;`. \r\nBut if you return nil in `sourceURLForBridge` and download JS manually RCTJSExecutor will raise assert in `- (void)executeApplicationScript:(NSData *)script sourceURL:(NSURL *)sourceURL onComplete:(RCTJavaScriptCompleteBlock)onComplete`\r\n\r\nWith this PR  I moved asserts to place where we really need it and updated comments for `sourceURLForBridge` method\r\n\r\n## Test Plan (required)\r\n\r\nThis can be tested with RCTBridgeDelegate that returns nil on `sourceURLForBridge` and download JS code with ` - (void)loadSourceForBridge:(RCTBridge *)bridge\r\nonProgress:(RCTSourceLoadProgressBlock)onProgress onComplete:(RCTSourceLoadBlock)loadCallback;`\r\n","created_at":"2017-04-03T17:24:03Z","updated_at":"2017-04-05T18:24:42Z","closed_at":"2017-04-05T18:24:42Z","merged_at":null,"merge_commit_sha":"a8c698adfe0a8980e29bc29916374a1c035a1d4c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/13270/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/13270/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/13270/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/008ecdfb7946234ce1b3193cbe19513b1cb579a4","head":{"label":"makadaw:makadaw/update-bridge-protocol","ref":"makadaw/update-bridge-protocol","sha":"008ecdfb7946234ce1b3193cbe19513b1cb579a4","user":{"login":"makadaw","id":215670,"avatar_url":"https://avatars0.githubusercontent.com/u/215670?v=3","gravatar_id":"","url":"https://api.github.com/users/makadaw","html_url":"https://github.com/makadaw","followers_url":"https://api.github.com/users/makadaw/followers","following_url":"https://api.github.com/users/makadaw/following{/other_user}","gists_url":"https://api.github.com/users/makadaw/gists{/gist_id}","starred_url":"https://api.github.com/users/makadaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makadaw/subscriptions","organizations_url":"https://api.github.com/users/makadaw/orgs","repos_url":"https://api.github.com/users/makadaw/repos","events_url":"https://api.github.com/users/makadaw/events{/privacy}","received_events_url":"https://api.github.com/users/makadaw/received_events","type":"User","site_admin":false},"repo":{"id":80657243,"name":"react-native","full_name":"makadaw/react-native","owner":{"login":"makadaw","id":215670,"avatar_url":"https://avatars0.githubusercontent.com/u/215670?v=3","gravatar_id":"","url":"https://api.github.com/users/makadaw","html_url":"https://github.com/makadaw","followers_url":"https://api.github.com/users/makadaw/followers","following_url":"https://api.github.com/users/makadaw/following{/other_user}","gists_url":"https://api.github.com/users/makadaw/gists{/gist_id}","starred_url":"https://api.github.com/users/makadaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makadaw/subscriptions","organizations_url":"https://api.github.com/users/makadaw/orgs","repos_url":"https://api.github.com/users/makadaw/repos","events_url":"https://api.github.com/users/makadaw/events{/privacy}","received_events_url":"https://api.github.com/users/makadaw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/makadaw/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/makadaw/react-native","forks_url":"https://api.github.com/repos/makadaw/react-native/forks","keys_url":"https://api.github.com/repos/makadaw/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makadaw/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makadaw/react-native/teams","hooks_url":"https://api.github.com/repos/makadaw/react-native/hooks","issue_events_url":"https://api.github.com/repos/makadaw/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/makadaw/react-native/events","assignees_url":"https://api.github.com/repos/makadaw/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/makadaw/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/makadaw/react-native/tags","blobs_url":"https://api.github.com/repos/makadaw/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makadaw/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makadaw/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/makadaw/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makadaw/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/makadaw/react-native/languages","stargazers_url":"https://api.github.com/repos/makadaw/react-native/stargazers","contributors_url":"https://api.github.com/repos/makadaw/react-native/contributors","subscribers_url":"https://api.github.com/repos/makadaw/react-native/subscribers","subscription_url":"https://api.github.com/repos/makadaw/react-native/subscription","commits_url":"https://api.github.com/repos/makadaw/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/makadaw/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/makadaw/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/makadaw/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/makadaw/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/makadaw/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makadaw/react-native/merges","archive_url":"https://api.github.com/repos/makadaw/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makadaw/react-native/downloads","issues_url":"https://api.github.com/repos/makadaw/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/makadaw/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/makadaw/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/makadaw/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makadaw/react-native/labels{/name}","releases_url":"https://api.github.com/repos/makadaw/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/makadaw/react-native/deployments","created_at":"2017-02-01T19:49:15Z","updated_at":"2017-02-01T19:49:28Z","pushed_at":"2017-04-03T17:16:08Z","git_url":"git://github.com/makadaw/react-native.git","ssh_url":"git@github.com:makadaw/react-native.git","clone_url":"https://github.com/makadaw/react-native.git","svn_url":"https://github.com/makadaw/react-native","homepage":"http://facebook.github.io/react-native/","size":117822,"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":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"10cb0f9325647757cd13ee6ea7ade23ae3ea29e6","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars0.githubusercontent.com/u/69631?v=3","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://avatars0.githubusercontent.com/u/69631?v=3","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-04-05T18:17:34Z","pushed_at":"2017-04-05T18:00:38Z","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":120626,"stargazers_count":46540,"watchers_count":46540,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10772,"mirror_url":null,"open_issues_count":1290,"forks":10772,"open_issues":1290,"watchers":46540,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/13270"},"html":{"href":"https://github.com/facebook/react-native/pull/13270"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/13270"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/13270/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/13270/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/13270/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/008ecdfb7946234ce1b3193cbe19513b1cb579a4"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":5,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"javache"}}