DescriptionScopedStyleResolver should be cleared when ShadowRoot is removed from document.
If a shadow root (=treescope), which has a style element, is moved from a document to another document, a new ShadowStyleSheetCollection is created for the shadow root.
The ShadowStyleSheetCollection has no active stylesheets, but the treescope's scopedStyleResolver has an active stylesheet.
The active stylesheet has been already cleared (i.e. clearOwnerNode is invoked) while moving.
However, StyleEngine cannot clear the treescope's resolver, because the ShadowStyleSheetCollection has no information. This causes heap-use-after-free.
BUG=443017
TEST=fast/html/marquee-clone-crash.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187602
Patch Set 1 #Patch Set 2 : Fixed treeboundary-crossing-rules regression #Patch Set 3 : Imported test from https://codereview.chromium.org/808333002/ #
Messages
Total messages: 12 (4 generated)
|