Auto merge of #19307 - avadacatavra:domrefcellpanic, r=jdm

change parse_own_css to queue event not fire synchronously

<!-- Please describe your changes on the following line: -->
fixes a panic and aligns with spec

I've also added checks around each mutable borrow of the tokenizer to see if we can catch any other panics

---
<!-- 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 #18930 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

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

<!-- 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/19307)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-12-01 11:41:47 -06:00 committed by GitHub
commit 712d75af01
9 changed files with 72 additions and 3 deletions

View file

@ -314573,6 +314573,12 @@
{}
]
],
"html/semantics/document-metadata/the-style-element/style_load_async.html": [
[
"/html/semantics/document-metadata/the-style-element/style_load_async.html",
{}
]
],
"html/semantics/document-metadata/the-style-element/style_media.html": [
[
"/html/semantics/document-metadata/the-style-element/style_media.html",
@ -539856,6 +539862,10 @@
"77a9ee6e0d58d2aa905423f3b6f9d55492ed8eb9",
"testharness"
],
"html/semantics/document-metadata/the-style-element/style_load_async.html": [
"09e5519ec1a2d1f8b044f9d1309cf36695d4631d",
"testharness"
],
"html/semantics/document-metadata/the-style-element/style_media.html": [
"3d608438361d8bec5726feb468a3c2fbd5b7cb7d",
"testharness"

View file

@ -0,0 +1,4 @@
[microtasks-and-constructors.html]
expected: CRASH
bug: https://github.com/servo/servo/issues/19392

View file

@ -0,0 +1,4 @@
[parser-fallsback-to-unknown-element.html]
expected: CRASH
bug: https://github.com/servo/servo/issues/19392

View file

@ -0,0 +1,25 @@
<!doctype html>
<html>
<meta charset="utf-8">
<title>Style load event should be async</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var t = async_test("style load should be async");
var sync = true;
function check() {
assert_false(sync);
t.done();
}
</script>
<style onload="t.step(check)">
</style>
<script>
sync = false
</script>
<body>
<div id="log"></div>
<div id="test"></div>
</body>
</html>