DescriptionFix leak in ServiceWorkerVersionTest.RepeatedlyObserveStatusChanges
In r262636 I deleted the Shutdown() methods from SWRegistration and
SWVersion, but it caused a leak in RepeatedlyObserveStatusChanges.
In the previous code the status change callback (ObserveStatusChanges)
holds a ref to ServiceWorkerVersion, which was ok when we had Shutdown()
(as we could explicitly clear the status change callback there), but
now we don't, so we have cyclic reference there.
I just changed make_scoped_refptr(version) to base::Unretained(version)
when we pass the version to the callback, so that the callback no longer
holds a ref to the Version.
BUG=361504
TEST=ServiceWorkerVersionTest.RepeatedlyObserveStatusChanges with asan/lsan
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262933
Patch Set 1 #
Messages
Total messages: 10 (0 generated)
|