Chromium Code Reviews
Description[Merge M50] aw: 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
Review URL: https://codereview.chromium.org/1900323002
Cr-Commit-Position: refs/heads/master@{#388394}
(cherry picked from commit 9e1b6d426ecb1302df0aca23fa3cc96bdc8d83bd)
Committed: https://chromium.googlesource.com/chromium/src/+/64b8b7f87e81a57c5127f4d2de1684c6d5c1dde1
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||