DescriptionImprove CancellableTaskFactory handling and Oilpan usage.
If a CancellableTaskFactory is used by an Oilpan heap object, the
closure that the factory works with/over, cannot embed a reference
back to that object by way of an off-heap Persistent<> (WTF::Closure
is not on the heap.) If it does, such a reference will keep the heap
object alive, without it ever being released. Memory leaks are very likely.
This is too easy a slip-up to make with the current CancellableTaskFactory
constructor, so rephrase the constructor so as to make leaks no longer (easily)
possible. For Oilpan heap objects baked into the closure, the persistent reference
now held will be weak.
At the same time, take the opportunity to have this object no longer be a part object,
but a separate (off-heap) allocation. This lets us drop the ad-hoc ASan unpoisoning
support that was previously needed if CancellableTaskFactory was a part object
of an Oilpan heap object. Less magic.
R=haraken
BUG=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201787
Patch Set 1 #Patch Set 2 : tweaks #Patch Set 3 : add explanatory comment #Patch Set 4 : rebased #
Total comments: 4
Patch Set 5 : add unwrap() clarification #
Messages
Total messages: 12 (4 generated)
|