DescriptionFix crash on null ptr dereference in EventPath propagation
Usually ShadowRoot->host() is non-null, but a test case
revealed that during event propagation, non-null is
not guaranteed.
There are some conditions required to reproduce:
1. some synchronous events have to be queued
2. shadow host is removed during a prior event handler
3. a queued event is delivered to the orphaned shadow
tree (including its shadow root, whose host is null)
This happens when a shadow host's ElementShadow object
is destructed. If Oilpan is enabled, this doesn't happen
because the host's ElementShadow is not destructed
immediately.
This is from issue 1230503002 at patchset 1 (http://crrev.com/1230503002#ps1)
Modified to make the change effective only when Oilpan is
disabled.
BUG=507413
TEST=fast/event/event-fire-disconnected-shadow-dom-crash.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199940
Patch Set 1 : dtapuska@'s original change #Patch Set 2 : make the change effective only when !OILPAN #Patch Set 3 : rebase #Patch Set 4 : update comments, rename test case. #Patch Set 5 : add another comment #
Total comments: 1
Patch Set 6 : minimize test case #Patch Set 7 : update the comment (not necessarily async events) #
Messages
Total messages: 12 (2 generated)
|