Commit 55cb377d 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.

TBR=oshima@chromium.org

Bug: 768446
Change-Id: I989b4096b452da0c92765143f05139413deb10b8
Reviewed-on: https://chromium-review.googlesource.com/728920Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510209}
parent ffe1fe8d
......@@ -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)
return 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