mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
e6040e95d1
This is sound because the unlink implementation of the stylesheet drops the preserved wrapper, and there are no strong references back to any node from the stylesheet or any of the non-unlinked members. This almost is the same setup that works for document sheets. We need to account for a double reference in case the sheet is applicable because Servo keeps another reference to it in that case, instead of in the StyleSet / PresShell. Added the testcase as a crashtest, in the hopes that if it regresses leak reporting on automation will catch it. MozReview-Commit-ID: Kcc5oaOvP9A
7 lines
185 B
HTML
7 lines
185 B
HTML
<!doctype html>
|
|
<div id="host"></div>
|
|
<script>
|
|
host.attachShadow({ mode: "open" }).innerHTML = `<style></style>`;
|
|
host.shadowRoot.styleSheets[0].foobie = host.shadowRoot;
|
|
</script>
|