char* retval; if (mEncoder) { retval = UnicodeToNewBytes(PromiseFlatString(aStr).get(), aStr.Length(), mEncoder); } else { retval = ToNewCString(aStr); }
NS_ASSERTION(mEncoder, "Encoder not available. Losing data !"); if (mEncoder) return UnicodeToNewBytes(aStr, mEncoder, aOut);
nsFormSubmission::EncodeVal(const nsAString& aStr){  char* retval;  if (mEncoder) {    retval = UnicodeToNewBytes(PromiseFlatString(aStr).get(), aStr.Length(),                               mEncoder);  } else {    retval = ToNewCString(aStr);  }  return retval;}