Bug 1384944 - Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16; r?padenot draft
authorChun-Min Chang <chun.m.chang@gmail.com>
Fri, 28 Jul 2017 15:41:20 +0800
changeset 617278 fde5c6efb16eaf6ddf82b0f6bceb13847090032d
parent 617246 5845151f1a2cd00957fdd48e204542ccbdfaba1e
child 639780 fffabc6dcecd89079aba7cca9593e5e2e11509bc
push id71015
push userbmo:cchang@mozilla.com
push dateFri, 28 Jul 2017 09:32:15 +0000
reviewerspadenot
bugs1384944
milestone56.0a1
Bug 1384944 - Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16; r?padenot
dom/media/CubebUtils.cpp
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -605,19 +605,19 @@ void GetDeviceCollection(nsTArray<RefPtr
     cubeb_device_collection collection = { nullptr, 0 };
     if (cubeb_enumerate_devices(context,
                                 aSide == Input ? CUBEB_DEVICE_TYPE_INPUT :
                                                  CUBEB_DEVICE_TYPE_OUTPUT,
                                 &collection) == CUBEB_OK) {
       for (unsigned int i = 0; i < collection.count; ++i) {
         auto device = collection.device[i];
         RefPtr<AudioDeviceInfo> info =
-          new AudioDeviceInfo(NS_ConvertASCIItoUTF16(device.friendly_name),
-                              NS_ConvertASCIItoUTF16(device.group_id),
-                              NS_ConvertASCIItoUTF16(device.vendor_name),
+          new AudioDeviceInfo(NS_ConvertUTF8toUTF16(device.friendly_name),
+                              NS_ConvertUTF8toUTF16(device.group_id),
+                              NS_ConvertUTF8toUTF16(device.vendor_name),
                               ConvertCubebType(device.type),
                               ConvertCubebState(device.state),
                               ConvertCubebPreferred(device.preferred),
                               ConvertCubebFormat(device.format),
                               ConvertCubebFormat(device.default_format),
                               device.max_channels,
                               device.default_rate,
                               device.max_rate,