Chromium Code Reviews| Index: chrome/browser/ui/webui/welcome_handler.cc |
| diff --git a/chrome/browser/ui/webui/welcome_handler.cc b/chrome/browser/ui/webui/welcome_handler.cc |
| index f23d092abea7153cdd0a8f17eaad2eb1b8817692..b06ea2bd3d9e8ddabc356fdf3ce930e56904d5d7 100644 |
| --- a/chrome/browser/ui/webui/welcome_handler.cc |
| +++ b/chrome/browser/ui/webui/welcome_handler.cc |
| @@ -46,6 +46,11 @@ void WelcomeHandler::HandleActivateSignIn(const base::ListValue* args) { |
| // them away to the NTP instead. |
| GoToNewTabPage(); |
| } else { |
| + // browser_ does not always properly initialize in the constructor. |
| + // https://crbug.com/656153 |
|
dpapad
2016/10/18 18:17:02
+dbeam who might know more about WebUI lifetime re
|
| + if (browser_ == nullptr) { |
| + browser_ = chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); |
| + } |
| browser_->ShowModalSigninWindow( |
| profiles::BubbleViewMode::BUBBLE_VIEW_MODE_GAIA_SIGNIN, |
| signin_metrics::AccessPoint::ACCESS_POINT_START_PAGE); |