[printing] Check |preview_ui_| is bounded before calling mojo interfaces
This CL fixes the crash caused by calling mojom::PrintPreviewUI on the unbounded |preview_ui_|. PrepareFrameAndViewForPrint::DidStopLoading() is an implementation of a blink::WebViewClient method and it's called when the loading is stopped. At that time, the preview dialog could be closed already and |preview_ui_| is unbound. When the preview UI used legacy IPC messages, it searched the preview UI first and then passed the messages. So, this CL adds also checking if |preview_ui_| is bound. Bug: 1084641,1008939 Change-Id: Ifcb80306e485c8796456512777ebc67b62e9842d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2208847Reviewed-by:Lei Zhang <thestig@chromium.org> Commit-Queue: Julie Kim <jkim@igalia.com> Cr-Commit-Position: refs/heads/master@{#770975}
Showing
Please register or sign in to comment