Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(8)

Issue 1463433002: Use RefPtr for MutationObserver in MutationObserverInterestGroup. (Closed)

Created:
5 years ago by kochi
Modified:
5 years ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 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)
kochi
tkent-san, Could you review?
5 years ago (2015-11-19 05:53:37 UTC) #4
tkent
lgtm. It seems this CL won't make reference cycles.
5 years ago (2015-11-19 06:03:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1463433002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1463433002/40001
5 years ago (2015-11-19 06:12:13 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-11-19 07:17:52 UTC) #8
commit-bot: I haz the power
5 years ago (2015-11-19 07:18:36 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/a17c2c87065be2c4dcb586583b1d69a5c85dae20
Cr-Commit-Position: refs/heads/master@{#360541}

Powered by Google App Engine
This is Rietveld 408576698