-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not update attributes in HTMLBodyElement::insertedInto.
Use didNotifySubtreeInsertionsToDocument instead. BUG=356095 TEST=automated [email protected] Review URL: https://codereview.chromium.org/212793007 git-svn-id: svn://svn.chromium.org/blink/trunk@170216 bbb929c8-8fbe-4397-9dbb-9b2b20218538
- Loading branch information
1 parent
11b4697
commit b72d4e3
Showing
4 changed files
with
45 additions
and
16 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
LayoutTests/fast/dom/HTMLBodyElement/body-inserting-iframe-crash-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PASS if not crashed. |
25 changes: 25 additions & 0 deletions
25
LayoutTests/fast/dom/HTMLBodyElement/body-inserting-iframe-crash.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
|
||
var iframe = null; | ||
|
||
function start() { | ||
iframe = document.createElement('iframe'); | ||
iframe.setAttribute('marginwidth', 1); | ||
document.body.appendChild(iframe); | ||
|
||
var bodyInFrame = document.createElement('body'); | ||
bodyInFrame.addEventListener('DOMSubtreeModified', removeIframe); | ||
iframe.contentDocument.documentElement.appendChild(bodyInFrame); | ||
document.body.innerHTML = 'PASS if not crashed.'; | ||
} | ||
|
||
function removeIframe() { | ||
iframe.parentNode.removeChild(iframe); | ||
iframe = null; | ||
gc(); | ||
} | ||
</script> | ||
<body onload="start()"> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters