aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-01-24 07:06:51 -0800
committerGitHub <noreply@github.com>2017-01-24 07:06:51 -0800
commitc3f0c9054feb97f4b3c106393930887d9841df1f (patch)
tree89c45e07c6d0bef4707c5c31b14ecbb46e8204dd /components/layout_thread/lib.rs
parent2ff42462154025b1aed97a825e3a171eaa156d9b (diff)
parent068f9608dc3a2b1ac260df6c600aa470f807b675 (diff)
downloadservo-c3f0c9054feb97f4b3c106393930887d9841df1f.tar.gz
servo-c3f0c9054feb97f4b3c106393930887d9841df1f.zip
Auto merge of #15145 - SwagColoredKitteh:issue-15101, r=emilio
Prevent crashing when a link tag has two or more in-flight requests (fix for issue #15101) <!-- Please describe your changes on the following line: --> The `HTMLLinkElement::set_stylesheet` function now checks whether there already is a stylesheet, and if there is, calls `Document::invalidate_stylesheets` after modifying `self.stylesheet`. This PR also includes a minimal WPT that causes the panic. This is fundamentally a timing issue, so while this fix prevents the crash, it does not fix the underlying issue. Making a &lt;link&gt; element send a second request before the first can finish and then getting the two stylesheet responses out-of-order will apply the wrong stylesheet, as demonstrated with https://gist.github.com/SwagColoredKitteh/2c24c7fac635445042eda4a30e10420e. r? @emilio --- <!-- 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 #15101 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/15145) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout_thread/lib.rs')
0 files changed, 0 insertions, 0 deletions