Trust not the caller. Bug 369216, r+sr=jst

This commit is contained in:
bzbarsky%mit.edu 2007-02-09 04:43:09 +00:00
Родитель 34caf9e676
Коммит 8aa6046372
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -3318,7 +3318,11 @@ nsDocument::AddBinding(nsIDOMElement* aContent, const nsAString& aURI)
nsCOMPtr<nsIContent> content(do_QueryInterface(aContent));
nsCOMPtr<nsIURI> uri;
NS_NewURI(getter_AddRefs(uri), aURI);
rv = NS_NewURI(getter_AddRefs(uri), aURI);
if (NS_FAILED(rv)) {
return rv;
}
return mBindingManager->AddLayeredBinding(content, uri);
}