зеркало из https://github.com/mozilla/pjs.git
Bug 732951 - Propagate nsContentUtils::ASCIIToLower/ASCIIToUpper error. r=bz
This commit is contained in:
Родитель
fc4b85c501
Коммит
fa2f1f0ae1
|
@ -337,7 +337,10 @@ nsDOMDataTransfer::GetData(const nsAString& aFormat, nsAString& aData)
|
|||
// for the URL type, parse out the first URI from the list. The URIs are
|
||||
// separated by newlines
|
||||
nsAutoString lowercaseFormat;
|
||||
nsContentUtils::ASCIIToLower(aFormat, lowercaseFormat);
|
||||
rv = nsContentUtils::ASCIIToLower(aFormat, lowercaseFormat);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (lowercaseFormat.EqualsLiteral("url")) {
|
||||
PRInt32 lastidx = 0, idx;
|
||||
|
|
|
@ -352,8 +352,10 @@ nsGenericHTMLElement::SetAttribute(const nsAString& aName,
|
|||
nsCOMPtr<nsIAtom> nameAtom;
|
||||
if (IsInHTMLDocument()) {
|
||||
nsAutoString lower;
|
||||
nsContentUtils::ASCIIToLower(aName, lower);
|
||||
nameAtom = do_GetAtom(lower);
|
||||
rv = nsContentUtils::ASCIIToLower(aName, lower);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nameAtom = do_GetAtom(lower);
|
||||
}
|
||||
}
|
||||
else {
|
||||
nameAtom = do_GetAtom(aName);
|
||||
|
|
|
@ -326,7 +326,10 @@ nsHTMLCanvasElement::ToDataURLImpl(const nsAString& aMimeType,
|
|||
}
|
||||
|
||||
nsAutoString type;
|
||||
nsContentUtils::ASCIIToLower(aMimeType, type);
|
||||
nsresult rv = nsContentUtils::ASCIIToLower(aMimeType, type);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsAutoString params;
|
||||
|
||||
|
@ -367,8 +370,7 @@ nsHTMLCanvasElement::ToDataURLImpl(const nsAString& aMimeType,
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIInputStream> stream;
|
||||
nsresult rv = ExtractData(type, params, getter_AddRefs(stream),
|
||||
fallbackToPNG);
|
||||
rv = ExtractData(type, params, getter_AddRefs(stream), fallbackToPNG);
|
||||
|
||||
// If there are unrecognized custom parse options, we should fall back to
|
||||
// the default values for the encoder without any options at all.
|
||||
|
|
|
@ -407,7 +407,10 @@ HTMLContentSink::AddAttributes(const nsIParserNode& aNode,
|
|||
nsAutoString key;
|
||||
for (; i != limit; i += step) {
|
||||
// Get lower-cased key
|
||||
nsContentUtils::ASCIIToLower(aNode.GetKeyAt(i), key);
|
||||
nsresult rv = nsContentUtils::ASCIIToLower(aNode.GetKeyAt(i), key);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAtom> keyAtom = do_GetAtom(key);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче