Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Break Document::m_associatedFormControls reference cycle.
<https://webkit.org/b/170946> Reviewed by Antti Koivisto. There was a race between didAssociateFormControls() and didAssociateFormControlsTimerFired() where detaching Document from its frame between the two would lead to an unbreakable reference cycle between Document and its form elements. Solve this by clearing the set of associated form elements in removedLastRef(), where we clear all the other strong smart pointers to elements. * dom/Document.cpp: (WebCore::Document::removedLastRef): Canonical link: https://commits.webkit.org/187873@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
18 additions
and 0 deletions.
- +17 −0 Source/WebCore/ChangeLog
- +1 −0 Source/WebCore/dom/Document.cpp
There are no files selected for viewing
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
@@ -625,6 +625,7 @@ void Document::removedLastRef() | ||
m_fullScreenElement = nullptr; | ||
m_fullScreenElementStack.clear(); | ||
#endif | ||
m_associatedFormControls.clear(); | ||
|
||
detachParser(); | ||
|
||