gecko-dev/servo/components/layout_thread
Alan Jeffrey 322859253d servo: Merge #18514 - Remove sources of panic when laying out an iframe without a nested browsing context (from asajeffrey:layout-dont-panic-if-no-iframe-bc); r=emilio
<!-- Please describe your changes on the following line: -->

At the moment, layout panics if it discovers an iframe without a nested browsing context. Under normal circumstances, this is reasonable, but it requires very tight synchronization between script, layout, the constellation and the compositor. In particular, if a layout is in progress when an iframe's browsing context is discarded, this can trigger panic.

This PR fixes this in two ways:

1. Making the pipeline and browsing context ids optional in layout's representation of an iframe.
2. Shutting down layout before discarding a browsing context, rather than after.

This is belt and braces.

---
<!-- 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 #17482 and #18477
- [X] These changes do not require tests because the PR is fixing a panic caused by a race condition

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

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

Source-Repo: https://github.com/servo/servo
Source-Revision: c48ef50b7260df7f2e781e15bba37b08f0970062

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : d2bff55daaa2c40d23ef05e75b61f4979ae2cbe2
2017-09-22 09:34:12 -05:00
..
Cargo.toml servo: Merge #18056 - End TreeBuilder's reliance on DOM (from cynicaldevil:remove-treesink-dep-on-dom); r=nox 2017-08-18 16:27:05 -05:00
dom_wrapper.rs servo: Merge #18514 - Remove sources of panic when laying out an iframe without a nested browsing context (from asajeffrey:layout-dont-panic-if-no-iframe-bc); r=emilio 2017-09-22 09:34:12 -05:00
lib.rs servo: Merge #18566 - Thread state fixes (from bholley:thread_state_fixes); r=Manishearth 2017-09-19 15:05:54 -05:00