Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2199)

Unified Diff: chrome/browser/local_discovery/privet_url_fetcher.cc

Issue 1436373002: Fixed OSX crash in net::URLFetcherCore::URLFetcherCore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@context5
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/local_discovery/privet_url_fetcher.cc
diff --git a/chrome/browser/local_discovery/privet_url_fetcher.cc b/chrome/browser/local_discovery/privet_url_fetcher.cc
index 832bd43ae3986b0e59f6655cbd9d5b202fd36654..6208e8d770917ab0b5522b9809a8d9c96d35e018 100644
--- a/chrome/browser/local_discovery/privet_url_fetcher.cc
+++ b/chrome/browser/local_discovery/privet_url_fetcher.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/bind.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/json/json_reader.h"
#include "base/location.h"
#include "base/memory/singleton.h"
@@ -211,6 +212,12 @@ void PrivetURLFetcher::Try() {
void PrivetURLFetcher::Start() {
DCHECK_EQ(tries_, 0); // We haven't called |Start()| yet.
+ if (!url_.is_valid()) {
+ // Not yet clear why it's possible. crbug.com/513505
+ base::debug::DumpWithoutCrashing();
+ return delegate_->OnError(this, UNKNOWN_ERROR);
+ }
+
if (!send_empty_privet_token_ && !v3_mode_) {
std::string privet_access_token;
privet_access_token = GetPrivetAccessToken();
« no previous file with comments | « chrome/browser/local_discovery/privet_url_fetcher.h ('k') | chrome/browser/local_discovery/service_discovery_client_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698