The edge case might lead to unexpected behaviour. It happens when `Close()` function is called, then for some reason `camera_video_source_remote_` mojo becomes disconnected, leading to a call to `OnFatalErrorOrDisconnection()`. During `OnFatalErrorOrDisconnection()`, `camera_video_stream_subsciption_remote_` is reset, which would invoke the destructor of `CameraVideoFrameHandler`, while still in the middle of the function.
Change-Id: I9d72d7b8a0ac14fc6dd4aabdb765dcfe03d4f113
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5181880
Commit-Queue: Ahmed Moussa <ahmedmoussa@google.com>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1248321}