Auto merge of #11585 - asajeffrey:constellation-avoid-deadlock-during-pipeline-closure, r=larsbergstrom

Avoid deadlock when closing a pipeline.

<!-- Please describe your changes on the following line: -->
At the moment, the constellation blocks on a pipeline during closure. This PR makes pipeline closure asynchronous.

---
<!-- 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 #11546.
- [X] These changes do not require tests because testing for absence of deadlock is difficult.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11585)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-03 22:22:49 -05:00
commit 6581e3504a
7 changed files with 92 additions and 26 deletions

View file

@ -6472,6 +6472,12 @@
"url": "/_mozilla/mozilla/iframe_hierarchy.html"
}
],
"mozilla/iframe_replacement.html": [
{
"path": "mozilla/iframe_replacement.html",
"url": "/_mozilla/mozilla/iframe_replacement.html"
}
],
"mozilla/img_width_height.html": [
{
"path": "mozilla/img_width_height.html",

View file

@ -0,0 +1,29 @@
<html>
<head>
<meta charset="utf8" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<title>Iframe replacement test.</title>
</head>
<body>
<p>This is a test for https://github.com/servo/servo/issues/11546.</p>
</body>
<script>
async_test(function(t) {
setTimeout(t.step_func(function() {
var frame = document.createElement('iframe');
frame.src = "data:text/html,<p>test</p>";
document.body.appendChild(frame);
setTimeout(t.step_func(function() {
document.body.removeChild(frame);
frame = document.createElement('iframe');
frame.src = "data:text/html,<p>test</p>";
document.body.appendChild(frame);
setTimeout(t.step_func(function() {
t.done();
}), 100);
}), 100);
}), 100);
});
</script>
</html>