зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1240766 - Fix startup crash in Geolocation::Init() when principal URI is null r=jdm
This commit is contained in:
Родитель
066de48f44
Коммит
a2162b77a7
|
@ -1255,19 +1255,21 @@ Geolocation::Init(nsIDOMWindow* aContentDom)
|
|||
nsresult rv = mPrincipal->GetURI(getter_AddRefs(uri));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
bool isHttp;
|
||||
rv = uri->SchemeIs("http", &isHttp);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (uri) {
|
||||
bool isHttp;
|
||||
rv = uri->SchemeIs("http", &isHttp);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
bool isHttps;
|
||||
rv = uri->SchemeIs("https", &isHttps);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
bool isHttps;
|
||||
rv = uri->SchemeIs("https", &isHttps);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Store the protocol to send via telemetry later.
|
||||
if (isHttp) {
|
||||
mProtocolType = ProtocolType::HTTP;
|
||||
} else if (isHttps) {
|
||||
mProtocolType = ProtocolType::HTTPS;
|
||||
// Store the protocol to send via telemetry later.
|
||||
if (isHttp) {
|
||||
mProtocolType = ProtocolType::HTTP;
|
||||
} else if (isHttps) {
|
||||
mProtocolType = ProtocolType::HTTPS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче