Skip to content

Commit

Permalink
Ensure XSLTProcessor.transformToDocument() does not crash when called…
Browse files Browse the repository at this point in the history
… on a node from an inactive document

Bug: 1092276
Test: xslt/transformToFragment-on-node-from-inactive-document-crash.html
Change-Id: I0e3c42d1580eef0a499810f280bb997ef1e61740
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2236234
Auto-Submit: Nate Chapin <japhet@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776269}
  • Loading branch information
natechapin authored and chromium-wpt-export-bot committed Jun 9, 2020
1 parent 0fd4d2f commit e483e41
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions xslt/transformToFragment-on-node-from-inactive-document-crash.html
@@ -0,0 +1,11 @@
<body>
<iframe id=i></iframe>
<script>
var el = i.contentDocument.documentElement;
i.remove()
var x = new XSLTProcessor();
var xsl =new DOMParser().parseFromString('<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"/>','application/xml');
x.importStylesheet(xsl);
x.transformToDocument(el);
</script>
</body>

0 comments on commit e483e41

Please sign in to comment.