зеркало из https://github.com/mozilla/pjs.git
Bug 660533 Remove useless uses of PromiseFlatCString r=jimm
This commit is contained in:
Родитель
e0759926e6
Коммит
9aa00a8691
|
@ -353,9 +353,7 @@ GfxInfo::Init()
|
|||
setupGetDeviceRegistryProperty &&
|
||||
setupDestroyDeviceInfoList) {
|
||||
/* create a device information set composed of the current display device */
|
||||
HDEVINFO devinfo = setupGetClassDevs(NULL,
|
||||
PromiseFlatString(mDeviceID).get(),
|
||||
NULL,
|
||||
HDEVINFO devinfo = setupGetClassDevs(NULL, mDeviceID.get(), NULL,
|
||||
DIGCF_PRESENT | DIGCF_PROFILE | DIGCF_ALLCLASSES);
|
||||
|
||||
if (devinfo != INVALID_HANDLE_VALUE) {
|
||||
|
|
|
@ -122,7 +122,7 @@ ParseDriverVersion(nsAString& aVersion, PRUint64 *aNumericVersion)
|
|||
{
|
||||
int a, b, c, d;
|
||||
/* honestly, why do I even bother */
|
||||
if (sscanf(nsPromiseFlatCString(NS_LossyConvertUTF16toASCII(aVersion)).get(),
|
||||
if (sscanf(NS_LossyConvertUTF16toASCII(aVersion).get(),
|
||||
"%d.%d.%d.%d", &a, &b, &c, &d) != 4)
|
||||
return false;
|
||||
if (a < 0 || a > 0xffff) return false;
|
||||
|
|
|
@ -665,7 +665,7 @@ NS_IMETHODIMP GfxInfoBase::GetFailures(PRUint32 *failureCount NS_OUTPARAM, char
|
|||
|
||||
/* copy over the failure messages into the array we just allocated */
|
||||
for (PRUint32 i = 0; i < *failureCount; i++) {
|
||||
nsPromiseFlatCString flattenedFailureMessage(mFailures[i]);
|
||||
nsCString& flattenedFailureMessage(mFailures[i]);
|
||||
(*failures)[i] = (char*)nsMemory::Clone(flattenedFailureMessage.get(), flattenedFailureMessage.Length() + 1);
|
||||
|
||||
if (!(*failures)[i]) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче