DescriptionUse RefPtr for MutationObserver in MutationObserverInterestGroup.
In MutaionObserverInterestGroup, MutationObservers were held in HashSet
as raw pointers. In case a MutationObserver is gone while mutation
events are collected (and garbage collector collects the object),
it causes use-after-free while the code tries to enqueue the recorded
mutation events. Use RefPtr<> to hold the pointer so that the object
will be kept until it goes out of scope.
BUG=557981
TEST=fast/dom/MutationObserver/mutation-and-deletion-race.html
Committed: https://crrev.com/a17c2c87065be2c4dcb586583b1d69a5c85dae20
Cr-Commit-Position: refs/heads/master@{#360541}
Patch Set 1 #Patch Set 2 : add a test #Patch Set 3 : Fix the test #
Messages
Total messages: 9 (4 generated)
|