servo/components
bors-servo 16b0da5004 Auto merge of #14312 - asajeffrey:script-discard-documents, r=cbrewster
Implement discarding Document objects to reclaim space.

<!-- Please describe your changes on the following line: -->

This 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.

Note 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.

Also note that this interacts with browser.html in that the reloading triggered by reactivating a document triggers mozbrowser events.

To 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.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14262.
- [X] These changes do not require tests because we should be able to use the existing tests with `-Zdiscard-inactive-documents`.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14312)
<!-- Reviewable:end -->
2017-01-04 13:58:57 -08:00
..
atoms Fire 'input' event after 'keypress' in input and textarea elements 2016-12-27 15:57:34 +05:30
bluetooth refactor Connect/Disconnect calls 2016-12-22 15:49:29 +01:00
bluetooth_traits Auto merge of #14612 - szeged:connect-disconnect-update, r=jdm 2016-12-22 06:51:16 -08:00
canvas Remove azure(canvas) dependency from canvas_traits 2016-12-25 17:41:29 +02:00
canvas_traits Remove azure(canvas) dependency from canvas_traits 2016-12-25 17:41:29 +02:00
compositing replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
config Default --max-session-history is now 16. 2017-01-04 17:02:03 +00:00
constellation Pass test-tidy. 2017-01-04 15:23:37 +00:00
debugger Removed util. 2016-12-14 18:04:37 -06:00
devtools replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
devtools_traits
geometry Removed util. 2016-12-14 18:04:37 -06:00
gfx replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
gfx_traits
jstraceable_derive Mark JSTraceable and its method as unsafe 2016-12-06 13:15:06 -10:00
layout Switch to crates.io for atomic_refcell. 2017-01-03 18:14:27 -08:00
layout_thread style: Document the stylist module. 2017-01-02 12:57:51 +01:00
layout_traits
msg
net Auto merge of #14784 - mattnenterprise:fetch-api-updates, r=jdm,KiChjang 2017-01-02 11:30:51 -08:00
net_traits Rustfmt net_traits. 2017-01-03 15:06:41 +01:00
plugins Update to rustc 1.16.0-nightly (4ecc85beb 2016-12-28) 2017-01-02 10:51:02 +01:00
profile replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
profile_traits Removed util. 2016-12-14 18:04:37 -06:00
range
remutex Removed util. 2016-12-14 18:04:37 -06:00
script Auto merge of #14312 - asajeffrey:script-discard-documents, r=cbrewster 2017-01-04 13:58:57 -08:00
script_layout_interface Switch to crates.io for atomic_refcell. 2017-01-03 18:14:27 -08:00
script_traits Rustfmt script_traits. 2017-01-03 14:07:30 +01:00
servo Update WR (windows font fixes, ridge/groove borders, scrolling improvements). 2016-12-23 14:00:40 +10:00
style Auto merge of #14844 - emilio:to-css-simplification, r=SimonSapin 2017-01-04 09:37:48 -08:00
style_traits style: Document style_traits and deny missing docs on it. 2016-12-31 12:17:07 +01:00
url Implement discarding Document objects to reclaim space. 2017-01-04 11:29:31 +00:00
webdriver_server Remove unused boolean argument from ContellationMsg's GetPipeline 2016-12-25 13:06:31 +02:00