Bug 660534 Remove useless use of PromiseFlatCString r=joedrew!
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Thu, 09 Jun 2011 21:14:01 +0100
changeset 71015 3d68f32c68b74f632f95eaad1ab4433f50fe7473
parent 71014 b3e5dd43281f0d89acf5a0b27119c1cd51407932
child 71016 10f50879c454482c0dbf5e9057d0a09b7afc0d54
push id52
push userdholbert@mozilla.com
push dateTue, 14 Jun 2011 01:52:20 +0000
treeherdermozilla-inbound@b65e22bc0c28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew
bugs660534
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 660534 Remove useless use of PromiseFlatCString r=joedrew!
modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp
--- a/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp
+++ b/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.cpp
@@ -114,17 +114,17 @@ NS_IMETHODIMP nsJPEGEncoder::InitFromDat
     // have options string
     const nsString qualityPrefix(NS_LITERAL_STRING("quality="));
     if (aOutputOptions.Length() > qualityPrefix.Length()  &&
         StringBeginsWith(aOutputOptions, qualityPrefix)) {
       // have quality string
       nsCString value = NS_ConvertUTF16toUTF8(Substring(aOutputOptions,
                                                         qualityPrefix.Length()));
       int newquality = -1;
-      if (PR_sscanf(PromiseFlatCString(value).get(), "%d", &newquality) == 1) {
+      if (PR_sscanf(value.get(), "%d", &newquality) == 1) {
         if (newquality >= 0 && newquality <= 100) {
           quality = newquality;
         } else {
           NS_WARNING("Quality value out of range, should be 0-100, using default");
         }
       } else {
         NS_WARNING("Quality value invalid, should be integer 0-100, using default");
       }