| Index: components/exo/compositor_frame_sink_holder.h
|
| diff --git a/components/exo/compositor_frame_sink_holder.h b/components/exo/compositor_frame_sink_holder.h
|
| index 59cc9879e8908be5adeeae3adf1a92fa5b83bd4c..363aea2c0bd00a7e214cbdcd5bddf91d58918f3a 100644
|
| --- a/components/exo/compositor_frame_sink_holder.h
|
| +++ b/components/exo/compositor_frame_sink_holder.h
|
| @@ -79,14 +79,13 @@ class CompositorFrameSinkHolder
|
|
|
| void UpdateNeedsBeginFrame();
|
|
|
| - // Each release callback holds a reference to the CompositorFrameSinkHolder
|
| - // itself to keep it alive. Running and erasing the callbacks might result in
|
| - // the instance being destroyed. Therefore, we should not access any member
|
| - // variables after running and erasing the callbacks.
|
| + // Each release callback should should take a
|
| + // scoped_refptr<CompositorFrameSinkHolder> so that CompositorFrameSinkHolder
|
| + // lives at least until all callbacks are run. Running the
|
| + // callbacks might result in the instance being destroyed. Therefore, we
|
| + // should not access any member variables after running the callbacks.
|
| using ResourceReleaseCallbackMap =
|
| - std::map<int,
|
| - std::pair<scoped_refptr<CompositorFrameSinkHolder>,
|
| - std::unique_ptr<cc::SingleReleaseCallback>>>;
|
| + std::map<int, std::unique_ptr<cc::SingleReleaseCallback>>;
|
| ResourceReleaseCallbackMap release_callbacks_;
|
|
|
| Surface* surface_;
|
|
|