Commit 66abc863 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Add browser availability check to Window AppleScript.

WindowAppleScript initialization with profile sometimes crashes and this
can be due to unavailability of browser creation at that time.
Code added to prevent crash and facilitate further investigation.

Bug: 1144992
Change-Id: I4835f443cca7e29c7f66334b06ca0f878702ea4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2516359Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824769}
parent 28126e7b
......@@ -77,6 +77,14 @@
}
if ((self = [super init])) {
// TODO(https://crbug.com/1144992): If crash fixed, investigate why browser
// cannot be created here.
if (Browser::GetBrowserCreationStatusForProfile(aProfile) !=
Browser::BrowserCreationStatus::kOk) {
NOTREACHED();
[self release];
return nil;
}
_browser = Browser::Create(Browser::CreateParams(aProfile, false));
chrome::NewTab(_browser);
_browser->window()->Show();
......
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