angler-fishThe Vulnerability History Project

Use 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

Review URL: https://codereview.chromium.org/1463433002

Cr-Commit-Position: refs/heads/master@{#360541}
    
commit a17c2c87065be2c4dcb586583b1d69a5c85dae20
-9
-24
+3 -3
+2 -2
+3 -3
+1 -1
expand_less