diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-28 00:03:17 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-28 00:03:17 +0000 |
commit | 35b9ae79505ac4e25cdb704cc65b6807c9dfe29f (patch) | |
tree | 89ff21d9f953e833e71a66b73f9d6454a721f836 /content/browser/ssl/ssl_error_handler.cc | |
parent | cfb44a0f74b8c5c7ad3cd1c5d9c49ba3d0af4f4d (diff) | |
download | chromium_src-35b9ae79505ac4e25cdb704cc65b6807c9dfe29f.zip chromium_src-35b9ae79505ac4e25cdb704cc65b6807c9dfe29f.tar.gz chromium_src-35b9ae79505ac4e25cdb704cc65b6807c9dfe29f.tar.bz2 |
Fix ExpiredCertAndGoBackTests.
According to Darin, it doesn't make sense to call CancelRequest if it's not pending. Checking is_pending before calling CancelRequest fixes the flakiness (passed on 1,000 tries)
BUG=40932
TEST=NONE
Review URL: https://chromiumcodereview.appspot.com/9453028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/ssl/ssl_error_handler.cc')
-rw-r--r-- | content/browser/ssl/ssl_error_handler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/browser/ssl/ssl_error_handler.cc b/content/browser/ssl/ssl_error_handler.cc index e3eceab..a41ac1b 100644 --- a/content/browser/ssl/ssl_error_handler.cc +++ b/content/browser/ssl/ssl_error_handler.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -135,7 +135,7 @@ void SSLErrorHandler::CompleteCancelRequest(int error) { net::URLRequest* request = resource_dispatcher_host_->GetURLRequest(request_id_); - if (request) { + if (request && request->is_pending()) { // The request can be NULL if it was cancelled by the renderer (as the // result of the user navigating to a new page from the location bar). DVLOG(1) << "CompleteCancelRequest() url: " << request->url().spec(); |