Bug 1542347 - eliminate needless string flattening in OSReauthenticator; r=keeler

We already have a null-terminated `nsString` in this code; we don't need
to turn it into another null-terminated `nsString`.

Depends on D26355

Differential Revision: https://phabricator.services.mozilla.com/D26356

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nathan Froyd 2019-04-08 16:26:10 +00:00
Родитель 5da67ad8db
Коммит 4e774a774b
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -84,8 +84,7 @@ static nsresult ReauthenticateUserWindows(const nsACString& aPrompt,
credui.cbSize = sizeof(credui);
// TODO: maybe set parent (Firefox) here.
credui.hwndParent = nullptr;
const nsString& tmpPrompt = NS_ConvertUTF8toUTF16(aPrompt);
const nsString& prompt = PromiseFlatString(tmpPrompt);
const nsString& prompt = NS_ConvertUTF8toUTF16(aPrompt);
credui.pszMessageText = prompt.get();
credui.pszCaptionText = nullptr;
credui.hbmBanner = nullptr; // ignored