| Index: chrome/browser/login_prompt_mac.mm
|
| diff --git a/chrome/browser/login_prompt_mac.mm b/chrome/browser/login_prompt_mac.mm
|
| index 8a9e93c65c4c96f90cacb41d4877c236b066ba0d..c4384c2e1f7b319ce23e9a10123527b3f0fb780e 100644
|
| --- a/chrome/browser/login_prompt_mac.mm
|
| +++ b/chrome/browser/login_prompt_mac.mm
|
| @@ -82,6 +82,17 @@ class LoginHandlerMac : public LoginHandler,
|
| std::wstring explanation) {
|
| DCHECK(MessageLoop::current() == ui_loop_);
|
|
|
| + TabContents* requesting_contents = GetTabContentsForLogin();
|
| + DCHECK(requesting_contents);
|
| +
|
| + // If something goes wrong (e.g., there's already a tab-modal sheet up),
|
| + // cancel the authorization.
|
| + if (!requesting_contents ||
|
| + !requesting_contents->CanCreateConstrainedDialog()) {
|
| + CancelAuth();
|
| + return;
|
| + }
|
| +
|
| // Load nib here instead of in constructor.
|
| sheet_controller_ = [[[LoginHandlerSheet alloc]
|
| initWithLoginHandler:this] autorelease];
|
|
|