Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: third_party/WebKit/LayoutTests/dom/document/adoptNode-reparenting-crash.html

Issue 2752673003: DOM: adoptNode() should not crash by reparenting the specified node in removeChild(). (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <div id="test-container"><script>
5 var sacrifice;
6 test(() => {
7 let testContainer = document.getElementById('test-container');
8 let iframe = document.createElement('iframe');
9 testContainer.appendChild(iframe);
10 let doc = iframe.contentDocument;
11 let script = doc.createElementNS('http://www.w3.org/2000/svg', 'script');
12 script.type = 'invalid-type';
13 script.textContent = 'document.body.appendChild(parent.sacrifice)';
14 sacrifice = document.createElement('div');
15 script.appendChild(sacrifice);
16 doc.body.appendChild(script);
17 script.type = '';
18 // adoptNode() calls script.removeNode(sacrifice) internally, and this DOM
19 // mutation kicks the script.
20 document.adoptNode(sacrifice);
21 }, 'Reparenting in removeNode() in adoptNode() should not crash.');
22 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698