[Android] Fix crash if OmniboxStartupMetrics destroyed before delayed task is run
ToolbarManager#onDeferredStartup may post a delayed task to the UI thread that calls itself. If the activity that owns the ToolbarManager is destroyed before the task is run (and ToolbarManager#destroy is called) then the mOmniboxStartupMetrics could be a null pointer. This cl adds a check to see if the activity is finishing when the delayed task is run and noops out if it has. Bug: 860449 Change-Id: Iac8333d26311142ce8e130b42aa5c7c551b844ca Reviewed-on: https://chromium-review.googlesource.com/1127304Reviewed-by:Yusuf Ozuysal <yusufo@chromium.org> Commit-Queue: Mohamed Heikal <mheikal@chromium.org> Cr-Commit-Position: refs/heads/master@{#573386}
Showing
Please register or sign in to comment