-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick a47510d. rdar://problem/103268511
Fix potential crash under IntersectionObserver::disconnect() https://bugs.webkit.org/show_bug.cgi?id=248111 rdar://100355921 Reviewed by Jonathan Bedard and Ryosuke Niwa. Make sure we protect the intersection observers and resize observers before calling disconnect() on them in Document::commonTeardown(). This is a speculative fix to address the crash in the radar, which I was unable to reproduce. * LayoutTests/fast/dom/lazy-loading-iframe-destruction-crash-expected.txt: Added. * LayoutTests/fast/dom/lazy-loading-iframe-destruction-crash.html: Added. Include test from the radar, even though it didn't reproduce the issue for me. * Source/WebCore/dom/Document.cpp: (WebCore::Document::commonTeardown): Canonical link: https://commits.webkit.org/252432.841@safari-7614-branch Canonical link: https://commits.webkit.org/245886.855@safari-7613.4.1.0-branch
- Loading branch information
Showing
3 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
LayoutTests/fast/dom/lazy-loading-iframe-destruction-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,9 @@ | ||
This test passes if it doesn't crash. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
24 changes: 24 additions & 0 deletions
24
LayoutTests/fast/dom/lazy-loading-iframe-destruction-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,24 @@ | ||
<script src="../../resources/js-test.js"></script> | ||
<script> | ||
jsTestIsAsync = true; | ||
|
||
function runTest() { | ||
description("This test passes if it doesn't crash."); | ||
|
||
inputElement.selectionDirection = "forward"; | ||
inputElement.setRangeText("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); | ||
setTimeout(finishJSTest, 100); | ||
} | ||
|
||
function inputSelectHandler() { | ||
outputElement.innerHTML = rpElement.innerHTML;; | ||
gc(); | ||
} | ||
</script> | ||
<body onload="runTest()"> | ||
<rp id="rpElement" onfocusin="f3()" onfocusout="f2()"> | ||
<iframe inputmode="numeric" loading="lazy" 1px" scrolling="yes"> | ||
</iframe> | ||
</rp> | ||
<input id="inputElement" contextmenu="x26" onselect="inputSelectHandler()" height="1024"> | ||
<output id="outputElement" dir="auto"> |
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