Chromium Code Reviews
Descriptionaw: Do not destroy functor in destroy
Functor has to be kept alive as long as the functor release callback is
still pending. This CL adds back the CleanupReference in AwGLFunctor
and remove the call from AwContents.DestroyRunnable.
Native AwContents is still destroyed before AwGLFunctor by ensuring that
AwContents.DestroyRunnable holds a reference to th AwGLFunctor referent,
which is only the AwGLFunctor.DestroyRunnable instead of AwGLFunctor
itself. This avoids strong references to the container View from any
DestroyRunnable.
Also remove destroying glue DrawGLFunctor from destroy. Now
DrawGLFunctor is destroyed only by its CleanupReference, and
DrawGLFucntor is kept alive by the (transitively) functor release
callback. Luckily it doesn't have any destruction ordering requirements
with other native objects.
BUG=597167
Committed: https://crrev.com/9e1b6d426ecb1302df0aca23fa3cc96bdc8d83bd
Cr-Commit-Position: refs/heads/master@{#388394}
Patch Set 1 #Patch Set 2 : add missing part #
Messages
Total messages: 19 (8 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||