Summary: | [CSS OM] StyledElementInlineStylePropertyMap creates a Ref cycle with its owner element | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
Component: | CSS | Assignee: | Ryosuke Niwa <rniwa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ddkilzer, dino, graouts, koivisto, simon.fraser, zalan | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Ryosuke Niwa
2019-03-19 21:44:41 PDT
Created attachment 365308 [details]
Fixes the bug
Created attachment 365309 [details]
Updated the change log
Comment on attachment 365309 [details] Updated the change log View in context: https://bugs.webkit.org/attachment.cgi?id=365309&action=review > Source/WebCore/dom/Element.cpp:209 > + if (auto* map = elementRareData()->attributeStyleMap()) > + map->clearElement(); Maybe ElementRareData should have a clearElement or clearNdoe function on it (In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 365309 [details] > Updated the change log > > View in context: > https://bugs.webkit.org/attachment.cgi?id=365309&action=review > > > Source/WebCore/dom/Element.cpp:209 > > + if (auto* map = elementRareData()->attributeStyleMap()) > > + map->clearElement(); > > Maybe ElementRareData should have a clearElement or clearNdoe function on it That approach makes sense as well. Although I'm hoping that I can just add the support for WeakPtr<Element> and remove this code. Committed r243239: <https://trac.webkit.org/changeset/243239> |