Skip to content

Commit

Permalink
Ensure XMLDocumentParser doesn't hit a nullptr isolate while parsing …
Browse files Browse the repository at this point in the history
…a fragment

Bug: 376320342
Change-Id: I2be68f5bab0158121abf82aea1f5b6b71fab585c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003358
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1379994}
  • Loading branch information
natechapin authored and chromium-wpt-export-bot committed Nov 7, 2024
1 parent a3b53ac commit 1b37e8e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<body>
<iframe id="i" src="resources/dummy-xml.xml"></iframe>
<script>
window.onload = () => {
let i = document.getElementById("i");
var range = i.contentDocument.createRange();
range.setStart(i.contentDocument.firstElementChild, 0);
i.remove();

range.createContextualFragment('<p>Should not crash</p>');
}
</script>
</body>
1 change: 1 addition & 0 deletions domparsing/resources/dummy-xml.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version='1.0' encoding='UTF-8'?><body/>

0 comments on commit 1b37e8e

Please sign in to comment.