зеркало из https://github.com/mozilla/pjs.git
Bug 660536 Remove useless uses of PromiseFlat(C)String r=smaug
This commit is contained in:
Родитель
10dec1a5aa
Коммит
b6b0f2fc65
|
@ -5235,7 +5235,7 @@ nsDocument::DoNotifyPossibleTitleChange()
|
|||
if (container) {
|
||||
nsCOMPtr<nsIBaseWindow> docShellWin = do_QueryInterface(container);
|
||||
if (docShellWin) {
|
||||
docShellWin->SetTitle(PromiseFlatString(title).get());
|
||||
docShellWin->SetTitle(title.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,8 +90,7 @@ DocumentRendererChild::RenderDocument(nsIDOMWindow *window,
|
|||
|
||||
nscolor bgColor;
|
||||
nsCSSParser parser;
|
||||
nsresult rv = parser.ParseColorString(PromiseFlatString(bgcolor),
|
||||
nsnull, 0, &bgColor);
|
||||
nsresult rv = parser.ParseColorString(bgcolor, nsnull, 0, &bgColor);
|
||||
if (NS_FAILED(rv))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ nsHTMLCanvasElement::ExtractData(const nsAString& aType,
|
|||
|
||||
try_again:
|
||||
if (mCurrentContext) {
|
||||
rv = mCurrentContext->GetInputStream(nsPromiseFlatCString(encoderType).get(),
|
||||
rv = mCurrentContext->GetInputStream(encoderType.get(),
|
||||
nsPromiseFlatString(aOptions).get(),
|
||||
getter_AddRefs(imgStream));
|
||||
} else {
|
||||
|
@ -239,7 +239,7 @@ nsHTMLCanvasElement::ExtractData(const nsAString& aType,
|
|||
nsCString enccid("@mozilla.org/image/encoder;2?type=");
|
||||
enccid += encoderType;
|
||||
|
||||
nsCOMPtr<imgIEncoder> encoder = do_CreateInstance(nsPromiseFlatCString(enccid).get(), &rv);
|
||||
nsCOMPtr<imgIEncoder> encoder = do_CreateInstance(enccid.get(), &rv);
|
||||
if (NS_SUCCEEDED(rv) && encoder) {
|
||||
rv = encoder->InitFromData(emptyCanvas->Data(),
|
||||
size.width * size.height * 4,
|
||||
|
@ -398,7 +398,7 @@ nsHTMLCanvasElement::GetContextHelper(const nsAString& aContextId,
|
|||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICanvasRenderingContextInternal> ctx =
|
||||
do_CreateInstance(nsPromiseFlatCString(ctxString).get(), &rv);
|
||||
do_CreateInstance(ctxString.get(), &rv);
|
||||
if (rv == NS_ERROR_OUT_OF_MEMORY) {
|
||||
*aContext = nsnull;
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
|
@ -285,7 +285,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, PRBool *persistant,
|
|||
rv = childKey->ReadStringValue(NS_LITERAL_STRING("JavaHome"), path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
verBlock curVer;
|
||||
TranslateVersionStr(PromiseFlatString(childName).get(), &curVer);
|
||||
TranslateVersionStr(childName.get(), &curVer);
|
||||
if (CompareVersion(curVer, minVer) >= 0) {
|
||||
if (browserJavaVersion == childName) {
|
||||
newestPath = path;
|
||||
|
@ -351,7 +351,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, PRBool *persistant,
|
|||
nsAutoString path;
|
||||
rv = regKey->ReadStringValue(NS_LITERAL_STRING(""), path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
GetFileVersion(PromiseFlatString(path).get(), &qtVer);
|
||||
GetFileVersion(path.get(), &qtVer);
|
||||
}
|
||||
regKey->Close();
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, PRBool *persistant,
|
|||
nsAutoString path;
|
||||
rv = regKey->ReadStringValue(NS_LITERAL_STRING(""), path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
GetFileVersion(PromiseFlatString(path).get(), &wmpVer);
|
||||
GetFileVersion(path.get(), &wmpVer);
|
||||
}
|
||||
regKey->Close();
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, PRBool *persistant,
|
|||
rv = regKey->GetChildName(index, childName);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
verBlock curVer;
|
||||
TranslateVersionStr(PromiseFlatString(childName).get(), &curVer);
|
||||
TranslateVersionStr(childName.get(), &curVer);
|
||||
|
||||
childName += NS_LITERAL_STRING("\\InstallPath");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче