diff options
Diffstat (limited to 'content/browser/ssl/ssl_error_handler.cc')
-rw-r--r-- | content/browser/ssl/ssl_error_handler.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/content/browser/ssl/ssl_error_handler.cc b/content/browser/ssl/ssl_error_handler.cc index e193d0e..1a76172 100644 --- a/content/browser/ssl/ssl_error_handler.cc +++ b/content/browser/ssl/ssl_error_handler.cc @@ -19,7 +19,7 @@ using content::RenderViewHostImpl; using content::WebContents; using net::SSLInfo; -SSLErrorHandler::SSLErrorHandler(Delegate* delegate, +SSLErrorHandler::SSLErrorHandler(base::WeakPtr<Delegate> delegate, const content::GlobalRequestID& id, ResourceType::Type resource_type, const GURL& url, @@ -134,7 +134,8 @@ void SSLErrorHandler::CompleteCancelRequest(int error) { const SSLInfo* ssl_info = NULL; if (cert_error) ssl_info = &cert_error->ssl_info(); - delegate_->CancelSSLRequest(request_id_, error, ssl_info); + if (delegate_) + delegate_->CancelSSLRequest(request_id_, error, ssl_info); request_has_been_notified_ = true; // We're done with this object on the IO thread. @@ -151,7 +152,8 @@ void SSLErrorHandler::CompleteContinueRequest() { if (request_has_been_notified_) return; - delegate_->ContinueSSLRequest(request_id_); + if (delegate_) + delegate_->ContinueSSLRequest(request_id_); request_has_been_notified_ = true; // We're done with this object on the IO thread. |