Bug 1384944 - Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16. r=padenot, a=gchang
authorChun-Min Chang <chun.m.chang@gmail.com>
Fri, 28 Jul 2017 15:41:20 +0800
changeset 423632 e4803d1bcef0c47559758aba652a1ac7761630c0
parent 423631 8dbb3f787e2bcb77cc9f8dbdc4215c79431945eb
child 423633 a60be780c0d78f4a2bc16efda26795005d19dc7f
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot, gchang
bugs1384944
milestone56.0
Bug 1384944 - Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16. r=padenot, a=gchang
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,