DescriptionDon't use dangling reference in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline
This patch changes to avoid dangling reference in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline().
In this function, we hold pointer to inlineStyle member in ElemendData from
|node|. The |node| doesn't change in loop body unless it doesn't have a
self-conflicting inline style, e.g. <b style="font-weight: normal">. In this
case, we should update |inlineStyle| variable to new value from ElementData of
newly created element.
Note: Attached test case is failed only on ASAN build by heap-use-after-free.
BUG=356517
TEST=LayoutTests/editing/execCommand/remove-redundant-styles-and-keep-style-span-inline-crashed.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170133
Patch Set 1 #
Total comments: 2
Patch Set 2 : 2014-03-27T12:28:22 #
Messages
Total messages: 8 (0 generated)
|