{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/33584011","id":33584011,"diff_hunk":"@@ -115,20 +133,17 @@ var NetworkManager = (function NetworkManagerClosure() {\n         pendingRequest.expectedStatus = 200;\n       }\n \n-      if (args.onProgressiveData) {\n-        // Some legacy browsers might throw an exception.\n-        try {\n-          xhr.responseType = 'moz-chunked-arraybuffer';\n-        } catch(e) {}\n-        if (xhr.responseType === 'moz-chunked-arraybuffer') {\n-          pendingRequest.onProgressiveData = args.onProgressiveData;\n-          pendingRequest.mozChunked = true;\n-        } else {\n-          xhr.responseType = 'arraybuffer';\n-        }\n+//#if (GENERIC || FIREFOX || MOZCENTRAL)\n+      if (args.onProgressiveData && supportsMozChunked) {\n+        xhr.responseType = 'moz-chunked-arraybuffer';\n+        pendingRequest.onProgressiveData = args.onProgressiveData;\n+        pendingRequest.mozChunked = true;\n       } else {\n         xhr.responseType = 'arraybuffer';\n       }\n+//#else","path":"src/core/network.js","position":48,"original_position":48,"commit_id":"d9410f389411082758dc715b237151312f200943","original_commit_id":"d9410f389411082758dc715b237151312f200943","user":{"login":"yurydelendik","id":1523410,"avatar_url":"https://avatars.githubusercontent.com/u/1523410?v=3","gravatar_id":"","url":"https://api.github.com/users/yurydelendik","html_url":"https://github.com/yurydelendik","followers_url":"https://api.github.com/users/yurydelendik/followers","following_url":"https://api.github.com/users/yurydelendik/following{/other_user}","gists_url":"https://api.github.com/users/yurydelendik/gists{/gist_id}","starred_url":"https://api.github.com/users/yurydelendik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurydelendik/subscriptions","organizations_url":"https://api.github.com/users/yurydelendik/orgs","repos_url":"https://api.github.com/users/yurydelendik/repos","events_url":"https://api.github.com/users/yurydelendik/events{/privacy}","received_events_url":"https://api.github.com/users/yurydelendik/received_events","type":"User","site_admin":false},"body":"make it `#if CHROMIUM` and move #else branch up","created_at":"2015-06-30T15:14:40Z","updated_at":"2015-06-30T15:14:40Z","html_url":"https://github.com/mozilla/pdf.js/pull/5531#discussion_r33584011","pull_request_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531","_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/33584011"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/5531#discussion_r33584011"},"pull_request":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531","id":25706909,"html_url":"https://github.com/mozilla/pdf.js/pull/5531","diff_url":"https://github.com/mozilla/pdf.js/pull/5531.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/5531.patch","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5531","number":5531,"state":"open","locked":false,"title":"Feature-test moz-chunked-arraybuffer before use","user":{"login":"Rob--W","id":1365071,"avatar_url":"https://avatars.githubusercontent.com/u/1365071?v=3","gravatar_id":"","url":"https://api.github.com/users/Rob--W","html_url":"https://github.com/Rob--W","followers_url":"https://api.github.com/users/Rob--W/followers","following_url":"https://api.github.com/users/Rob--W/following{/other_user}","gists_url":"https://api.github.com/users/Rob--W/gists{/gist_id}","starred_url":"https://api.github.com/users/Rob--W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rob--W/subscriptions","organizations_url":"https://api.github.com/users/Rob--W/orgs","repos_url":"https://api.github.com/users/Rob--W/repos","events_url":"https://api.github.com/users/Rob--W/events{/privacy}","received_events_url":"https://api.github.com/users/Rob--W/received_events","type":"User","site_admin":false},"body":"Resubmission of https://github.com/mozilla/pdf.js/pull/5457, rebased to master. The previous one was closed with the following comment:\r\n\r\n> Closing for now. #5448 has landed, so the issue itself should be fixed with less code than in this PR. Optimizions for the landed fix can be proposed in a new (rebased) PR.\r\n\r\nThis PR indeed has a bit more code, but that is caused by the fact that this PR uses feature detection instead of try-catch.\r\nThe other diff is just some re-indention after moving the Mozilla-specific APIs between preprocessor conditionals.","created_at":"2014-12-08T23:28:01Z","updated_at":"2015-06-30T15:14:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31eb88a6429d2a056152938ba7cee2062168a33a","assignee":{"login":"yurydelendik","id":1523410,"avatar_url":"https://avatars.githubusercontent.com/u/1523410?v=3","gravatar_id":"","url":"https://api.github.com/users/yurydelendik","html_url":"https://github.com/yurydelendik","followers_url":"https://api.github.com/users/yurydelendik/followers","following_url":"https://api.github.com/users/yurydelendik/following{/other_user}","gists_url":"https://api.github.com/users/yurydelendik/gists{/gist_id}","starred_url":"https://api.github.com/users/yurydelendik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurydelendik/subscriptions","organizations_url":"https://api.github.com/users/yurydelendik/orgs","repos_url":"https://api.github.com/users/yurydelendik/repos","events_url":"https://api.github.com/users/yurydelendik/events{/privacy}","received_events_url":"https://api.github.com/users/yurydelendik/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531/commits","review_comments_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531/comments","review_comment_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/5531/comments","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/d9410f389411082758dc715b237151312f200943","head":{"label":"Rob--W:moz-chunked-only-moz","ref":"moz-chunked-only-moz","sha":"d9410f389411082758dc715b237151312f200943","user":{"login":"Rob--W","id":1365071,"avatar_url":"https://avatars.githubusercontent.com/u/1365071?v=3","gravatar_id":"","url":"https://api.github.com/users/Rob--W","html_url":"https://github.com/Rob--W","followers_url":"https://api.github.com/users/Rob--W/followers","following_url":"https://api.github.com/users/Rob--W/following{/other_user}","gists_url":"https://api.github.com/users/Rob--W/gists{/gist_id}","starred_url":"https://api.github.com/users/Rob--W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rob--W/subscriptions","organizations_url":"https://api.github.com/users/Rob--W/orgs","repos_url":"https://api.github.com/users/Rob--W/repos","events_url":"https://api.github.com/users/Rob--W/events{/privacy}","received_events_url":"https://api.github.com/users/Rob--W/received_events","type":"User","site_admin":false},"repo":{"id":8726737,"name":"pdf.js","full_name":"Rob--W/pdf.js","owner":{"login":"Rob--W","id":1365071,"avatar_url":"https://avatars.githubusercontent.com/u/1365071?v=3","gravatar_id":"","url":"https://api.github.com/users/Rob--W","html_url":"https://github.com/Rob--W","followers_url":"https://api.github.com/users/Rob--W/followers","following_url":"https://api.github.com/users/Rob--W/following{/other_user}","gists_url":"https://api.github.com/users/Rob--W/gists{/gist_id}","starred_url":"https://api.github.com/users/Rob--W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rob--W/subscriptions","organizations_url":"https://api.github.com/users/Rob--W/orgs","repos_url":"https://api.github.com/users/Rob--W/repos","events_url":"https://api.github.com/users/Rob--W/events{/privacy}","received_events_url":"https://api.github.com/users/Rob--W/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rob--W/pdf.js","description":"PDF Reader in JavaScript","fork":true,"url":"https://api.github.com/repos/Rob--W/pdf.js","forks_url":"https://api.github.com/repos/Rob--W/pdf.js/forks","keys_url":"https://api.github.com/repos/Rob--W/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rob--W/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rob--W/pdf.js/teams","hooks_url":"https://api.github.com/repos/Rob--W/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/Rob--W/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/Rob--W/pdf.js/events","assignees_url":"https://api.github.com/repos/Rob--W/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/Rob--W/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/Rob--W/pdf.js/tags","blobs_url":"https://api.github.com/repos/Rob--W/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rob--W/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rob--W/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rob--W/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rob--W/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Rob--W/pdf.js/languages","stargazers_url":"https://api.github.com/repos/Rob--W/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/Rob--W/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/Rob--W/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/Rob--W/pdf.js/subscription","commits_url":"https://api.github.com/repos/Rob--W/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rob--W/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rob--W/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rob--W/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rob--W/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/Rob--W/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rob--W/pdf.js/merges","archive_url":"https://api.github.com/repos/Rob--W/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rob--W/pdf.js/downloads","issues_url":"https://api.github.com/repos/Rob--W/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/Rob--W/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Rob--W/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Rob--W/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rob--W/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/Rob--W/pdf.js/releases{/id}","created_at":"2013-03-12T11:58:03Z","updated_at":"2015-03-10T14:24:42Z","pushed_at":"2015-06-06T14:10:50Z","git_url":"git://github.com/Rob--W/pdf.js.git","ssh_url":"git@github.com:Rob--W/pdf.js.git","clone_url":"https://github.com/Rob--W/pdf.js.git","svn_url":"https://github.com/Rob--W/pdf.js","homepage":"","size":46113,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"749a60a0b7cfee4146142af67075e5450fd9a4e3","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1663468,"name":"pdf.js","full_name":"mozilla/pdf.js","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/pdf.js","description":"PDF Reader in JavaScript","fork":false,"url":"https://api.github.com/repos/mozilla/pdf.js","forks_url":"https://api.github.com/repos/mozilla/pdf.js/forks","keys_url":"https://api.github.com/repos/mozilla/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pdf.js/teams","hooks_url":"https://api.github.com/repos/mozilla/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pdf.js/events","assignees_url":"https://api.github.com/repos/mozilla/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pdf.js/tags","blobs_url":"https://api.github.com/repos/mozilla/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pdf.js/languages","stargazers_url":"https://api.github.com/repos/mozilla/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pdf.js/subscription","commits_url":"https://api.github.com/repos/mozilla/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pdf.js/merges","archive_url":"https://api.github.com/repos/mozilla/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pdf.js/downloads","issues_url":"https://api.github.com/repos/mozilla/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pdf.js/releases{/id}","created_at":"2011-04-26T06:32:03Z","updated_at":"2015-06-30T14:31:13Z","pushed_at":"2015-06-30T08:38:13Z","git_url":"git://github.com/mozilla/pdf.js.git","ssh_url":"git@github.com:mozilla/pdf.js.git","clone_url":"https://github.com/mozilla/pdf.js.git","svn_url":"https://github.com/mozilla/pdf.js","homepage":"","size":114820,"stargazers_count":11990,"watchers_count":11990,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2710,"mirror_url":null,"open_issues_count":546,"forks":2710,"open_issues":546,"watchers":11990,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/5531"},"issue":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/5531"},"comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/5531/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/5531/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pdf.js/statuses/d9410f389411082758dc715b237151312f200943"}}}}