Bug 1257730 - Fix ping when no URI is available. r=sicking

This commit is contained in:
Christoph Kerschbaumer
2016-03-18 14:05:55 -07:00
parent 619dbfb7cb
commit 4f34cc75d3

View File

@@ -375,7 +375,10 @@ ForEachPing(nsIContent* aContent, ForEachPingCallback aCallback, void* aClosure)
ios->NewURI(NS_ConvertUTF16toUTF8(tokenizer.nextToken()),
doc->GetDocumentCharacterSet().get(),
baseURI, getter_AddRefs(uri));
// if we can't generate a valid URI, then there is nothing to do
if (!uri) {
continue;
}
// Explicitly not allow loading data: URIs
bool isDataScheme =
(NS_SUCCEEDED(uri->SchemeIs("data", &isDataScheme)) && isDataScheme);