{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/76708250","id":76708250,"diff_hunk":"@@ -0,0 +1,37 @@\n+/**\n+ * Copyright 2016 The AMP HTML Authors. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS-IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+/**\n+ * A bit like Array#filter, but removes elements that filter true from the\n+ * array. Returns the filtered items.\n+ *\n+ * @param {!Array<T>} array\n+ * @param {function(T, number, !Array<T>):boolean} filter\n+ * @return {!Array<T>}\n+ * @template T\n+ */\n+export function filterSplice(array, filter) {","path":"src/utils/array.js","position":26,"original_position":26,"commit_id":"5dace2d6987bd2255c655f2dfc4a14ec4efe5388","original_commit_id":"5dace2d6987bd2255c655f2dfc4a14ec4efe5388","user":{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},"body":"This needs tests","created_at":"2016-08-29T23:42:08Z","updated_at":"2016-08-29T23:42:08Z","html_url":"https://github.com/ampproject/amphtml/pull/4763#discussion_r76708250","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/4763","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/76708250"},"html":{"href":"https://github.com/ampproject/amphtml/pull/4763#discussion_r76708250"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4763"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/4763","id":83181112,"html_url":"https://github.com/ampproject/amphtml/pull/4763","diff_url":"https://github.com/ampproject/amphtml/pull/4763.diff","patch_url":"https://github.com/ampproject/amphtml/pull/4763.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/4763","number":4763,"state":"open","locked":false,"title":"Fix Iframe #postMessage Error","user":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/ampproject/amphtml/issues/4034.\r\n\r\nNever post to an iframe that is no longer active. We had three cases:\r\n\r\n1. When the iframe requests a resize, but is removed before the resize completes. In that case, we'd cue up a promise to eventually send a `embed-size-X` message but send it to a non-existent iframe window.\r\n2. When a ad's sub-iframes subscribe to the `embed-state` message, but the sub-iframe (or parent) is later removed.\r\n3. When an ad's or iframe's sub-iframes subscribe to the `intersection` message, but the sub-iframe is removed.","created_at":"2016-08-29T22:47:19Z","updated_at":"2016-08-29T23:42:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a065dd5cd98ad83f3dfaf97381abacf6ea818239","assignee":{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},"assignees":[{"login":"dvoytenko","id":726049,"avatar_url":"https://avatars.githubusercontent.com/u/726049?v=3","gravatar_id":"","url":"https://api.github.com/users/dvoytenko","html_url":"https://github.com/dvoytenko","followers_url":"https://api.github.com/users/dvoytenko/followers","following_url":"https://api.github.com/users/dvoytenko/following{/other_user}","gists_url":"https://api.github.com/users/dvoytenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoytenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoytenko/subscriptions","organizations_url":"https://api.github.com/users/dvoytenko/orgs","repos_url":"https://api.github.com/users/dvoytenko/repos","events_url":"https://api.github.com/users/dvoytenko/events{/privacy}","received_events_url":"https://api.github.com/users/dvoytenko/received_events","type":"User","site_admin":false},{"login":"nekodo","id":732742,"avatar_url":"https://avatars.githubusercontent.com/u/732742?v=3","gravatar_id":"","url":"https://api.github.com/users/nekodo","html_url":"https://github.com/nekodo","followers_url":"https://api.github.com/users/nekodo/followers","following_url":"https://api.github.com/users/nekodo/following{/other_user}","gists_url":"https://api.github.com/users/nekodo/gists{/gist_id}","starred_url":"https://api.github.com/users/nekodo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekodo/subscriptions","organizations_url":"https://api.github.com/users/nekodo/orgs","repos_url":"https://api.github.com/users/nekodo/repos","events_url":"https://api.github.com/users/nekodo/events{/privacy}","received_events_url":"https://api.github.com/users/nekodo/received_events","type":"User","site_admin":false},{"login":"zhouyx","id":5419904,"avatar_url":"https://avatars.githubusercontent.com/u/5419904?v=3","gravatar_id":"","url":"https://api.github.com/users/zhouyx","html_url":"https://github.com/zhouyx","followers_url":"https://api.github.com/users/zhouyx/followers","following_url":"https://api.github.com/users/zhouyx/following{/other_user}","gists_url":"https://api.github.com/users/zhouyx/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouyx/subscriptions","organizations_url":"https://api.github.com/users/zhouyx/orgs","repos_url":"https://api.github.com/users/zhouyx/repos","events_url":"https://api.github.com/users/zhouyx/events{/privacy}","received_events_url":"https://api.github.com/users/zhouyx/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/4763/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/4763/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/4763/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/5dace2d6987bd2255c655f2dfc4a14ec4efe5388","head":{"label":"jridgewell:iframe-postmessage-error","ref":"iframe-postmessage-error","sha":"5dace2d6987bd2255c655f2dfc4a14ec4efe5388","user":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"repo":{"id":48198933,"name":"amphtml","full_name":"jridgewell/amphtml","owner":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jridgewell/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/jridgewell/amphtml","forks_url":"https://api.github.com/repos/jridgewell/amphtml/forks","keys_url":"https://api.github.com/repos/jridgewell/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jridgewell/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jridgewell/amphtml/teams","hooks_url":"https://api.github.com/repos/jridgewell/amphtml/hooks","issue_events_url":"https://api.github.com/repos/jridgewell/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/jridgewell/amphtml/events","assignees_url":"https://api.github.com/repos/jridgewell/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/jridgewell/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/jridgewell/amphtml/tags","blobs_url":"https://api.github.com/repos/jridgewell/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jridgewell/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jridgewell/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/jridgewell/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jridgewell/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/jridgewell/amphtml/languages","stargazers_url":"https://api.github.com/repos/jridgewell/amphtml/stargazers","contributors_url":"https://api.github.com/repos/jridgewell/amphtml/contributors","subscribers_url":"https://api.github.com/repos/jridgewell/amphtml/subscribers","subscription_url":"https://api.github.com/repos/jridgewell/amphtml/subscription","commits_url":"https://api.github.com/repos/jridgewell/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/jridgewell/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/jridgewell/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/jridgewell/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/jridgewell/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/jridgewell/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jridgewell/amphtml/merges","archive_url":"https://api.github.com/repos/jridgewell/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jridgewell/amphtml/downloads","issues_url":"https://api.github.com/repos/jridgewell/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/jridgewell/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/jridgewell/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/jridgewell/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jridgewell/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/jridgewell/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/jridgewell/amphtml/deployments","created_at":"2015-12-17T21:21:35Z","updated_at":"2016-05-04T19:44:23Z","pushed_at":"2016-08-29T22:47:13Z","git_url":"git://github.com/jridgewell/amphtml.git","ssh_url":"git@github.com:jridgewell/amphtml.git","clone_url":"https://github.com/jridgewell/amphtml.git","svn_url":"https://github.com/jridgewell/amphtml","homepage":"http://justin.ridgewell.name/amphtml/","size":151348,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"6cda808632254a483b9a8eba9a55c1f766e9b4a8","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2016-08-29T23:30:55Z","pushed_at":"2016-08-29T23:39:20Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://ampproject.org","size":187876,"stargazers_count":8323,"watchers_count":8323,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1206,"mirror_url":null,"open_issues_count":715,"forks":1206,"open_issues":715,"watchers":8323,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4763"},"html":{"href":"https://github.com/ampproject/amphtml/pull/4763"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/4763"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/4763/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4763/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/4763/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/5dace2d6987bd2255c655f2dfc4a14ec4efe5388"}}}}
{"actor":{"display_login":"dvoytenko"}}