Commit 34556a0f authored by Weidong Guo's avatar Weidong Guo Committed by Commit Bot

Speculative Fix for a crash report-BookmarkBarView::ButtonPressed

https://codereview.chromium.org/2946813002 was intended to fix a issue
when |contents| is null and bookmark bar exists. But it also
unintendedly changed case when when |contents| is null and bookmark
bar does not exist. This patch just reverts that case.

The crash is not easily reproducible. This CL only speculatively fix
the crash. The bug will remain open until the crash is confirmed fix.

BUG=744211

Change-Id: Id092d16a75e087650a7edcba27115809de446d57
Reviewed-on: https://chromium-review.googlesource.com/595250
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491867}
parent ec750779
......@@ -2220,7 +2220,7 @@ ContentsLayoutManager* BrowserView::GetContentsLayoutManager() const {
bool BrowserView::MaybeShowBookmarkBar(WebContents* contents) {
bool show_bookmark_bar =
browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR);
if (!show_bookmark_bar && !bookmark_bar_view_.get())
if ((!show_bookmark_bar || !contents) && !bookmark_bar_view_.get())
return false;
if (!bookmark_bar_view_.get()) {
bookmark_bar_view_.reset(new BookmarkBarView(browser_.get(), this));
......
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