mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
Return NS_RDF_NO_VALUE if the hostname or referrer are empty, rather than a failure code (bug 313214). Patch by marria@gmail.com, r=bsmedberg, sr=me.
This commit is contained in:
parent
e7d4fe7b3d
commit
ff18a37d19
@ -1921,6 +1921,9 @@ nsGlobalHistory::GetTarget(nsIRDFResource* aSource,
|
||||
rv = GetRowValue(row, kToken_ReferrerColumn, str);
|
||||
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
// Avoid trying to create a resource from an empty string, which
|
||||
// will raise an exception
|
||||
if (str.IsEmpty()) return NS_RDF_NO_VALUE;
|
||||
|
||||
nsCOMPtr<nsIRDFResource> resource;
|
||||
rv = gRDFService->GetResource(str, getter_AddRefs(resource));
|
||||
|
Loading…
Reference in New Issue
Block a user