diff --git a/dom/vr/VRServiceTest.cpp b/dom/vr/VRServiceTest.cpp index 2117ad14c118..13bd0ef22198 100644 --- a/dom/vr/VRServiceTest.cpp +++ b/dom/vr/VRServiceTest.cpp @@ -322,7 +322,7 @@ VRServiceTest::AttachVRDisplay(const nsAString& aID, ErrorResult& aRv) } gfx::VRManagerChild* vm = gfx::VRManagerChild::Get(); - vm->CreateVRServiceTestDisplay(nsCString(ToNewUTF8String(aID)), p); + vm->CreateVRServiceTestDisplay(NS_ConvertUTF16toUTF8(aID), p); return p.forget(); } @@ -342,10 +342,10 @@ VRServiceTest::AttachVRController(const nsAString& aID, ErrorResult& aRv) } gfx::VRManagerChild* vm = gfx::VRManagerChild::Get(); - vm->CreateVRServiceTestController(nsCString(ToNewUTF8String(aID)), p); + vm->CreateVRServiceTestController(NS_ConvertUTF16toUTF8(aID), p); return p.forget(); } } // namespace dom -} // namespace mozilla \ No newline at end of file +} // namespace mozilla