Commit 4df6df18 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Infobars] Initialize InfoBarDelegate::infobar_

InfoBarDelegate::infobar_ was uninitialized during construction - which
is bad for delegates that try to access InfoBarDelegate::infobar().
Properly initialize it to nullptr.

Bug: None
Change-Id: I8f52e02fbca1486f7c60c8f2791cd7e8c464d5d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387118
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803355}
parent 4eaf6451
......@@ -122,7 +122,6 @@ InfoBarDelegate::AsOfflinePageInfoBarDelegate() {
}
#endif
InfoBarDelegate::InfoBarDelegate() : nav_entry_id_(0) {
}
InfoBarDelegate::InfoBarDelegate() = default;
} // namespace infobars
......@@ -280,10 +280,10 @@ class InfoBarDelegate {
private:
// The InfoBar associated with us.
InfoBar* infobar_;
InfoBar* infobar_ = nullptr;
// The ID of the active navigation entry at the time we became owned.
int nav_entry_id_;
int nav_entry_id_ = 0;
DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
};
......
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