mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Auto merge of #25747 - pshaughn:ceparser, r=jdm
Give attribute-change callbacks a realm so they can to_jsval <!-- Please describe your changes on the following line: --> The new failing case is #25746, which is about the connected callback rather than the attribute-change one and not directly related to this code change. --- <!-- 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 #19917 <!-- Either: --> - [X] There are tests for these changes <!-- 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. -->
This commit is contained in:
commit
43c558fa59
2 changed files with 7 additions and 1 deletions
|
@ -897,6 +897,10 @@ impl CustomElementReactionStack {
|
|||
}
|
||||
|
||||
let cx = element.global().get_cx();
|
||||
// We might be here during HTML parsing, rather than
|
||||
// during Javscript execution, and so we typically aren't
|
||||
// already in a realm here.
|
||||
let _ac = JSAutoRealm::new(*cx, element.global().reflector().get_jsobject().get());
|
||||
|
||||
let local_name = DOMString::from(&*local_name);
|
||||
rooted!(in(*cx) let mut name_value = UndefinedValue());
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
[parser-sets-attributes-and-children.html]
|
||||
expected: CRASH
|
||||
[HTML parser should call connectedCallback before appending child nodes.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue