Bug 660533 Remove useless uses of PromiseFlatCString r=jimm

This commit is contained in:
Neil Rashbrook 2011-06-22 21:52:09 +01:00
parent b6f49527bc
commit 8bfa7dd3e7
3 changed files with 3 additions and 5 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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]) {