Commit 5dfbdc57 authored by Alexander Alekseev's avatar Alexander Alekseev Committed by Commit Bot

Chrome OS: Fix BootTimesRecorder crash on renderer crash.

This CL adds NULL checks to BootTimesRecorder so that it won't crash
on renderer crash.

Bug: 768446
Change-Id: Ia5c6ef4d2963f6dbf71227a39486a9a5d4a0b1f6
Reviewed-on: https://chromium-review.googlesource.com/727192Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510150}
parent 1e6957e6
......@@ -66,7 +66,15 @@ RenderWidgetHost* GetRenderWidgetHost(NavigationController* tab) {
}
const std::string GetTabUrl(RenderWidgetHost* rwh) {
// rwh is null during initialization and shut down.
if (!rwh)
return std::string();
RenderWidgetHostView* rwhv = rwh->GetView();
// rwhv is null if renderer has crashed.
if (!rwhv)
std::string();
for (auto* browser : *BrowserList::GetInstance()) {
for (int i = 0, tab_count = browser->tab_strip_model()->count();
i < tab_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment