{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/14312","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/14312/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/14312/comments","events_url":"https://api.github.com/repos/servo/servo/issues/14312/events","html_url":"https://github.com/servo/servo/pull/14312","id":190840747,"number":14312,"title":"Implement discarding Document objects to reclaim space.","user":{"login":"asajeffrey","id":403333,"avatar_url":"https://avatars.githubusercontent.com/u/403333?v=3","gravatar_id":"","url":"https://api.github.com/users/asajeffrey","html_url":"https://github.com/asajeffrey","followers_url":"https://api.github.com/users/asajeffrey/followers","following_url":"https://api.github.com/users/asajeffrey/following{/other_user}","gists_url":"https://api.github.com/users/asajeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/asajeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asajeffrey/subscriptions","organizations_url":"https://api.github.com/users/asajeffrey/orgs","repos_url":"https://api.github.com/users/asajeffrey/repos","events_url":"https://api.github.com/users/asajeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/asajeffrey/received_events","type":"User","site_admin":false},"labels":[{"id":84750486,"url":"https://api.github.com/repos/servo/servo/labels/A-content/script","name":"A-content/script","color":"d7e102","default":false},{"id":15997753,"url":"https://api.github.com/repos/servo/servo/labels/I-memory-leak","name":"I-memory-leak","color":"e10c02","default":false},{"id":152310043,"url":"https://api.github.com/repos/servo/servo/labels/S-awaiting-review","name":"S-awaiting-review","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"KiChjang","id":3248587,"avatar_url":"https://avatars.githubusercontent.com/u/3248587?v=3","gravatar_id":"","url":"https://api.github.com/users/KiChjang","html_url":"https://github.com/KiChjang","followers_url":"https://api.github.com/users/KiChjang/followers","following_url":"https://api.github.com/users/KiChjang/following{/other_user}","gists_url":"https://api.github.com/users/KiChjang/gists{/gist_id}","starred_url":"https://api.github.com/users/KiChjang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KiChjang/subscriptions","organizations_url":"https://api.github.com/users/KiChjang/orgs","repos_url":"https://api.github.com/users/KiChjang/repos","events_url":"https://api.github.com/users/KiChjang/events{/privacy}","received_events_url":"https://api.github.com/users/KiChjang/received_events","type":"User","site_admin":false},"assignees":[{"login":"KiChjang","id":3248587,"avatar_url":"https://avatars.githubusercontent.com/u/3248587?v=3","gravatar_id":"","url":"https://api.github.com/users/KiChjang","html_url":"https://github.com/KiChjang","followers_url":"https://api.github.com/users/KiChjang/followers","following_url":"https://api.github.com/users/KiChjang/following{/other_user}","gists_url":"https://api.github.com/users/KiChjang/gists{/gist_id}","starred_url":"https://api.github.com/users/KiChjang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KiChjang/subscriptions","organizations_url":"https://api.github.com/users/KiChjang/orgs","repos_url":"https://api.github.com/users/KiChjang/repos","events_url":"https://api.github.com/users/KiChjang/events{/privacy}","received_events_url":"https://api.github.com/users/KiChjang/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-11-21T21:29:32Z","updated_at":"2016-11-21T21:30:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/servo/servo/pulls/14312","html_url":"https://github.com/servo/servo/pull/14312","diff_url":"https://github.com/servo/servo/pull/14312.diff","patch_url":"https://github.com/servo/servo/pull/14312.patch"},"body":"<!-- Please describe your changes on the following line: -->\r\n\r\nThis PR implements document discarding. Active documents are kept alive strongly, but inactive documents are only kept alive weakly. When a document is GCd, it is marked as discarded, and if it is every reactivated, a reload of the URL is triggered.\r\n\r\nNote that this PR is pretty aggressive about discarding, and can any inactive document (other than those being kept alive by other same-origin pipelines). We might want to damp it down a bit.\r\n\r\nAlso note that this interacts with browser.html in that the reloading triggered by reactivating a document triggers mozbrowser events.\r\n\r\nTo test this, I added a `-Zdiscard-inactive-documents` debug flag, which discards all inactive documents, even ones which are reachable through other same-origin pipelines.\r\n\r\n---\r\n<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->\r\n- [X] `./mach build -d` does not report any errors\r\n- [X] `./mach test-tidy` does not report any errors\r\n- [X] These changes fix #14262.\r\n- [X] These changes do not require tests because we should be able to use the existing tests with `-Zdiscard-inactive-documents`.\r\n\r\n<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/servo/servo/14312)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/262073172","html_url":"https://github.com/servo/servo/pull/14312#issuecomment-262073172","issue_url":"https://api.github.com/repos/servo/servo/issues/14312","id":262073172,"user":{"login":"asajeffrey","id":403333,"avatar_url":"https://avatars.githubusercontent.com/u/403333?v=3","gravatar_id":"","url":"https://api.github.com/users/asajeffrey","html_url":"https://github.com/asajeffrey","followers_url":"https://api.github.com/users/asajeffrey/followers","following_url":"https://api.github.com/users/asajeffrey/following{/other_user}","gists_url":"https://api.github.com/users/asajeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/asajeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asajeffrey/subscriptions","organizations_url":"https://api.github.com/users/asajeffrey/orgs","repos_url":"https://api.github.com/users/asajeffrey/repos","events_url":"https://api.github.com/users/asajeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/asajeffrey/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T21:30:01Z","updated_at":"2016-11-21T21:30:01Z","body":"cc @Ms2ger @ConnorGBrewster @metajack "}}
{"actor":{"display_login":"asajeffrey"}}