{"action":"created","issue":{"url":"https://api.github.com/repos/whatwg/fetch/issues/411","repository_url":"https://api.github.com/repos/whatwg/fetch","labels_url":"https://api.github.com/repos/whatwg/fetch/issues/411/labels{/name}","comments_url":"https://api.github.com/repos/whatwg/fetch/issues/411/comments","events_url":"https://api.github.com/repos/whatwg/fetch/issues/411/events","html_url":"https://github.com/whatwg/fetch/issues/411","id":187435472,"number":411,"title":"Streams and fetches that outlive the environment settings object","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-04T20:52:04Z","updated_at":"2016-11-07T08:54:02Z","closed_at":null,"body":"Spinning off from the discussion in https://github.com/whatwg/fetch/pull/388#issuecomment-248290780. /cc @yutakahirano \r\n\r\nI am not actually sure this is a problem. Note that JS objects can outlive their realm, e.g.\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<iframe srcdoc=\"<script>window.hello = {};</script>\"></iframe>\r\n<script>\r\nconst hello = frames[0].hello;\r\nframes[0].location.href = \"http://example.com/\":\r\n// `hello` is still a valid object\r\n</script>\r\n```\r\n\r\nSo is there any issue with this also being the case for streams that act as bodies?\r\n\r\nOne might think there is a problem with the object creation done by various stream operations. But no, that works fine too. Extend the above:\r\n\r\n```js\r\nconst ObjectFromDeadFrame = hello.constructor;\r\nconst anotherObjectCreatedInDeadRealm = new ObjectFromDeadFrame();\r\n```\r\n\r\nI guess it might be accurate to say the realm isn't destroyed as long as someone holds a reference to it. You could still collect various things, e.g. the `Document` object and so on. But all the stuff streams needs to function is still there."},"comment":{"url":"https://api.github.com/repos/whatwg/fetch/issues/comments/258778597","html_url":"https://github.com/whatwg/fetch/issues/411#issuecomment-258778597","issue_url":"https://api.github.com/repos/whatwg/fetch/issues/411","id":258778597,"user":{"login":"annevk","id":1544111,"avatar_url":"https://avatars.githubusercontent.com/u/1544111?v=3","gravatar_id":"","url":"https://api.github.com/users/annevk","html_url":"https://github.com/annevk","followers_url":"https://api.github.com/users/annevk/followers","following_url":"https://api.github.com/users/annevk/following{/other_user}","gists_url":"https://api.github.com/users/annevk/gists{/gist_id}","starred_url":"https://api.github.com/users/annevk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annevk/subscriptions","organizations_url":"https://api.github.com/users/annevk/orgs","repos_url":"https://api.github.com/users/annevk/repos","events_url":"https://api.github.com/users/annevk/events{/privacy}","received_events_url":"https://api.github.com/users/annevk/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T08:54:02Z","updated_at":"2016-11-07T08:54:02Z","body":"Yeah, globals stay alive if someone holds a reference to them (though Edge might do something funky here); it's not necessarily ideal though."}}
{"actor":{"display_login":"annevk"}}